Skip to content

Conversation

@jliermann
Copy link
Contributor

No description provided.

Copy link
Contributor

Copilot AI left a 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 clsx utility
  • 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.

import ElnStack from "./ElnStack";

import styles from "./Eln.module.css";
import styles from "@site/src/components/eln/ElnStyles.js";
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
import styles from "@site/src/components/eln/ElnStyles.js";
import styles from "@site/src/components/eln/ElnStyles";

Copilot uses AI. Check for mistakes.

import styles from "./Eln.module.css";

import styles from "@site/src/components/eln/ElnStyles.js";
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
import styles from "@site/src/components/eln/ElnStyles.js";
import styles from "@site/src/components/eln/ElnStyles";

Copilot uses AI. Check for mistakes.
@@ -1,38 +1,38 @@
import styles from "../Eln.module.css";
import styles from "@site/src/components/eln/ElnStyles.js";
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
import styles from "@site/src/components/eln/ElnStyles.js";
import styles from "@site/src/components/eln/ElnStyles";

Copilot uses AI. Check for mistakes.
@@ -1,32 +1,31 @@
import styles from "@site/src/components/eln/ElnStyles.js";
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
import styles from "@site/src/components/eln/ElnStyles.js";
import styles from "@site/src/components/eln/ElnStyles";

Copilot uses AI. Check for mistakes.
import FilterButton from "./FilterButton";

import styles from "../Eln.module.css";
import styles from "@site/src/components/eln/ElnStyles.js";
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
import styles from "@site/src/components/eln/ElnStyles.js";
import styles from "@site/src/components/eln/ElnStyles";

Copilot uses AI. Check for mistakes.
import ShortenDesc from "../commons/ShortenDesc.js";

import styles from "./Eln.module.css";
import styles from "@site/src/components/eln/ElnStyles.js";
Copy link

Copilot AI Jan 12, 2026

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.

Suggested change
import styles from "@site/src/components/eln/ElnStyles.js";
import styles from "@site/src/components/eln/ElnStyles";

Copilot uses AI. Check for mistakes.
props.subDisc ? { subDisc: props.subDisc } : {}
);
const [elnData, setElnData] = useState(null);
const [error, setError] = useState(null);
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable error.

Copilot uses AI. Check for mistakes.
const [elnData, setElnData] = useState(null);
const [error, setError] = useState(null);
const [elnData, setElnData] = useState(null);
const [error, setError] = useState(null);
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable error.

Copilot uses AI. Check for mistakes.
@jliermann
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Jan 12, 2026

@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.

Copilot AI and others added 2 commits January 12, 2026 16:48
Co-authored-by: jliermann <40795855+jliermann@users.noreply.github.com>
[WIP] Reorganize CSS architecture and standardize className handling
@jliermann jliermann merged commit 8ce587e into main Jan 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants