Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Devesh326/talawa-admin i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
Devesh326 committed Jan 20, 2024
2 parents ed487d8 + 42cba7c commit 7464d30
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 112 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ jobs:
- name: Checkout the Repository
uses: actions/checkout@v3

- name: Node.js Version
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v3
Expand Down Expand Up @@ -141,7 +136,6 @@ jobs:
path: talawa-admin-docs

Copy-docs-to-talawa-docs:
needs: Generate-Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,4 @@ yarn-error.log*
# express setup
debug.log

# No editor related files
.idea
.vscode
*.swp
.vscode
4 changes: 2 additions & 2 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This document provides instructions on how to set up and start a running instanc
- [Setting up this repository](#setting-up-this-repository)
- [Setting up npm](#setting-up-npm)
- [Setting up Typescript](#setting-up-typescript)
- [Installation With Docker](#installation-using-docker)
- [Installation With Docker](#installation-with-docker)
- [Installing required packages/dependencies](#installing-required-packagesdependencies)
- [Configuration](#configuration)
- [Creating .env file](#creating-env-file)
Expand Down Expand Up @@ -80,7 +80,7 @@ npm install -g typescript

For more details please refer to the installation guidelines provided in the [official docs](https://www.typescriptlang.org/download).

## Installation Using Docker
## Installation With Docker

> - **Requires Docker and Docker Compose to be installed**
Expand Down
32 changes: 6 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions scripts/config-overrides/custom_start.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
require('dotenv').config();
const { spawn } = require('child_process');

//const react_script_start = 'npx react-scripts start';
const reactAppRewiredStart =
'npx react-app-rewired start --config-overrides=scripts/config-overrides/';
const react_script_start = 'npx react-scripts start';
const react_app_rewired_start = 'npx react-app-rewired start --config-overrides=scripts/config-overrides';

if (process.env.ALLOW_LOGS === "YES") {
// Execute the npm command
spawn(react_app_rewired_start, { stdio: 'inherit', shell: true });

}
else {
// Execute the npm command
spawn(react_script_start, { stdio: 'inherit', shell: true });
}

spawn(reactAppRewiredStart, { stdio: 'inherit', shell: true });
87 changes: 24 additions & 63 deletions scripts/config-overrides/index.js
Original file line number Diff line number Diff line change
@@ -1,68 +1,29 @@
const {
override,
addWebpackPlugin,
overrideDevServer,
} = require('customize-cra');
const { override, addWebpackPlugin } = require('customize-cra');
const webpack = require('webpack');
const fs = require('fs');
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const redirectServedPath = require('react-dev-utils/redirectServedPathMiddleware');
const paths = require('react-scripts/config/paths');
const isAllowLogEnabled = process.env.ALLOW_LOGS === 'YES';
module.exports = {
webpack: override(
// Add your new webpack plugin
isAllowLogEnabled &&
(addWebpackPlugin(
new webpack.ProgressPlugin({
activeModules: true,
entries: true,
handler: (percentage, message, ...args) => {
// Log a custom progress message with active module and its count
console.info(
`<Webpack-Progress>: ${Math.floor(percentage * 100)}% ${message}`
);
},
modules: true,
modulesCount: 5000,
profile: false,
dependencies: true,
dependenciesCount: 10000,
percentBy: null,
})
),
// Modify infrastructureLogging level
(config) => {
config.infrastructureLogging = {
level: 'verbose',
};
return config;
})
),
devServer: overrideDevServer((config) => {
// Remove onAfterSetupMiddleware and onBeforeSetupMiddleware
config.onAfterSetupMiddleware = undefined;
config.onBeforeSetupMiddleware = undefined;

// Add devServer.setupMiddlewares
config.setupMiddlewares = (middlewares, devServer) => {
if (!devServer) {
throw new Error('webpack-dev-server is not defined');
}

if (fs.existsSync(paths.proxySetup)) {
require(paths.proxySetup)(devServer.app);
}
module.exports = override(
// Add your new webpack plugin
addWebpackPlugin(new webpack.ProgressPlugin({
activeModules: true,
entries: true,
handler: (percentage, message, ...args) => {
// Log a custom progress message with active module and its count
console.info(`<Webpack-Progress>: ${Math.floor(percentage * 100)}% ${message}`);
},
modules: true,
modulesCount: 5000,
profile: false,
dependencies: true,
dependenciesCount: 10000,
percentBy: null,
})),

middlewares.push(
evalSourceMapMiddleware(devServer),
redirectServedPath(paths.publicUrlOrPath),
noopServiceWorkerMiddleware(paths.publicUrlOrPath)
// Add your additional middlewares here if needed
);

return middlewares;
// Modify infrastructureLogging level
(config) => {
config.infrastructureLogging = {
level: 'verbose',
};
}),
};
return config;
}
);
7 changes: 0 additions & 7 deletions src/components/LeftDrawerOrg/LeftDrawerOrg.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,11 @@
.leftDrawer .profileContainer .profileText {
flex: 1;
text-align: start;
overflow: hidden;
}

.leftDrawer .profileContainer .profileText .primaryText {
font-size: 1.1rem;
font-weight: 600;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical;
word-wrap: break-word;
white-space: normal;
}

.leftDrawer .profileContainer .profileText .secondaryText {
Expand Down

0 comments on commit 7464d30

Please sign in to comment.