-
Notifications
You must be signed in to change notification settings - Fork 28
Localisation #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localisation #490
Conversation
refactor: classnames in camelcase for better code readability refactor: classnames in camelcase for better code readability refactor: classnames in camelcase for better code readability
Misc. fixes and refactoring of CSS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request reorganizes the CSS architecture by centralizing CSS modules from component directories into a dedicated src/css/ folder. The changes also standardize className handling using the clsx utility instead of string concatenation, and apply consistent code formatting throughout.
Changes:
- Centralized CSS modules from component folders to
src/css/directory - Updated all component imports to reference new CSS locations
- Replaced string concatenation for className props with
clsxutility - Applied consistent code formatting (spacing, indentation)
Reviewed changes
Copilot reviewed 30 out of 39 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/index.js | Updated to use clsx for className combinations |
| src/css/*.module.css | New centralized CSS module files for various components |
| src/css/deprecated.css | Moved deprecated CSS styles to separate file |
| src/components/repos/RepoButton.js | Updated CSS import path and applied clsx |
| src/components/repos/DecisionTree.js | Updated CSS import path and reformatted |
| src/components/lbe/*.js | Updated CSS import paths to centralized location |
| src/components/eln/*.js | Updated to use ElnStyles.js wrapper for combined styles |
| src/components/eln/ElnStyles.js | New wrapper combining ELN and LBE styles |
| src/components/eln/Eln.module.css | Deleted - moved to src/css/Eln.module.css |
| src/components/commons/*.js | Updated CSS import paths |
| src/components/chemotion/*.js | Updated CSS import paths and reformatted |
| src/components/*.js | Updated to use clsx and new CSS paths |
| src/components/deprecated/*.js | New deprecated components directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/eln/ElnFinderPharm.js
Outdated
| import ElnStack from "./ElnStack"; | ||
|
|
||
| import styles from "./Eln.module.css"; | ||
| import styles from "@site/src/components/eln/ElnStyles.js"; |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path includes the .js extension for ElnStyles. This is inconsistent with typical module import patterns and should be verified to work correctly.
| import styles from "@site/src/components/eln/ElnStyles.js"; | |
| import styles from "@site/src/components/eln/ElnStyles"; |
src/components/eln/ElnFinder.js
Outdated
|
|
||
| import styles from "./Eln.module.css"; | ||
|
|
||
| import styles from "@site/src/components/eln/ElnStyles.js"; |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path includes the .js extension for ElnStyles. This pattern should be verified to work correctly with your build configuration.
| import styles from "@site/src/components/eln/ElnStyles.js"; | |
| import styles from "@site/src/components/eln/ElnStyles"; |
| @@ -1,38 +1,38 @@ | |||
| import styles from "../Eln.module.css"; | |||
| import styles from "@site/src/components/eln/ElnStyles.js"; | |||
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path for ElnStyles.js should use a .js extension, but the file exports a default object, not a module. JavaScript/ES modules should not include the .js extension when importing from the same project, especially when importing a styles object. Consider changing the import to use the module path without the extension, or verify that this import works correctly in your build system.
| import styles from "@site/src/components/eln/ElnStyles.js"; | |
| import styles from "@site/src/components/eln/ElnStyles"; |
| @@ -1,32 +1,31 @@ | |||
| import styles from "@site/src/components/eln/ElnStyles.js"; | |||
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path includes the .js extension for a module that exports styles. This is inconsistent with how CSS modules are typically imported. The same issue exists in FilterButton.js, ElnFilter.js, ElnCard.js, ElnFinderPharm.js, and ElnFinder.js. Consider removing the .js extension or verifying that your build configuration supports this pattern.
| import styles from "@site/src/components/eln/ElnStyles.js"; | |
| import styles from "@site/src/components/eln/ElnStyles"; |
| import FilterButton from "./FilterButton"; | ||
|
|
||
| import styles from "../Eln.module.css"; | ||
| import styles from "@site/src/components/eln/ElnStyles.js"; |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path includes the .js extension for ElnStyles, which is inconsistent with standard CSS module imports. This pattern is repeated across multiple ELN-related files and should be verified to work correctly with your build system.
| import styles from "@site/src/components/eln/ElnStyles.js"; | |
| import styles from "@site/src/components/eln/ElnStyles"; |
src/components/eln/ElnCard.js
Outdated
| import ShortenDesc from "../commons/ShortenDesc.js"; | ||
|
|
||
| import styles from "./Eln.module.css"; | ||
| import styles from "@site/src/components/eln/ElnStyles.js"; |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path includes the .js extension for ElnStyles. Verify this works correctly with your build configuration, as this is an unusual pattern for importing a styles object from a JavaScript module that re-exports CSS modules.
| import styles from "@site/src/components/eln/ElnStyles.js"; | |
| import styles from "@site/src/components/eln/ElnStyles"; |
src/components/eln/ElnFinder.js
Outdated
| props.subDisc ? { subDisc: props.subDisc } : {} | ||
| ); | ||
| const [elnData, setElnData] = useState(null); | ||
| const [error, setError] = useState(null); |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable error.
src/components/eln/ElnFinderPharm.js
Outdated
| const [elnData, setElnData] = useState(null); | ||
| const [error, setError] = useState(null); | ||
| const [elnData, setElnData] = useState(null); | ||
| const [error, setError] = useState(null); |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable error.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@jliermann I've opened a new pull request, #491, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: jliermann <40795855+jliermann@users.noreply.github.com>
[WIP] Reorganize CSS architecture and standardize className handling
No description provided.