Skip to content
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

Dev danilo #8

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Dev danilo #8

wants to merge 20 commits into from

Conversation

horta
Copy link
Member

@horta horta commented Oct 31, 2024

This PR supersedes #7

horta added 20 commits October 25, 2024 17:45
- 🚀 Added a new image file: `public/banner.webp`
- 📝 Removed inline script from `index.html` for setting background
- 🎨 Updated `App.css` to use CSS variable for hero background
- Added overflow-x:hidden to html element
- Adjusted html margin for better horizontal alignment
- Extracted job checks into `checkJobsAhead` and `checkJobState`
- Simplified polling logic in `useInterval`
- Updated fallback symbol from `0` to `↺` in Result.jsx.
- Modify how `otherLines` are appended to `outputLines`:
- Replace `outputLines.push(...otherLines.join(""))`
- Use individual `push` calls for each element in `otherLines`

It was appending each individual character instead of each line.
- Modified `Result.jsx` to include unique keys in JSX elements.
- Wrapped `otherLines` array items with a `<p>` tag.

Improves React's performance by providing unique identifiers to help with
the rendering process and avoid potential key duplication issues. 🛠️
- **Upgraded** `react-router-dom` in `package.json` to version 6.27.0 for improved routing capabilities.
- **Modified** `public/index.html` to include styles from a new `index.css`.
- **Created** `public/index.css` for hero component styling.
- **Adjusted** layout in `index.html` for better UI alignment by removing unnecessary classes.
- **Removed** `src/App.js` and streamlined navigation using `Navigation.jsx` component.
- **Deleted** redundant `Result.jsx` replaced by new job components.
- **Introduced** `Error.jsx`, `Job.jsx`, `Navigation.jsx`, `Progress.jsx`, `Scan.jsx`, `Snap.jsx`, `Spinner.jsx`, and `UrlCopier.jsx` to enhance functionality.
- **Integrated** `react-toastify` for user notifications.
- **Updated** `index.js` to handle routing with `createBrowserRouter`.

These changes were made to enhance the user experience by improving routing, providing user feedback, and cleaning obsolete code, all while maintaining alignment with modern React practices. 🌟
- Modified `src/components/Job.jsx`:
- Wrapped return content in a `div` with `minHeight: "348px"`.
- Enhanced `DomainChunk` in `Snap.jsx`:
- Improved whitespace handling.
- Fixed index references for query and target lines.
- Removed unused `import { chunk }` statement.
- Introduced `partitionAt` utility to handle domain chunk partitioning.
- `deciphon.test.js`: Fix syntax errors and replace `click` with `realClick`.
- `job_failed.json` & `job_running.json`: Update "type" values for consistency.
- `e2e.js`: Remove commented code and import "cypress-real-events".
- `package.json`: Add `cypress-real-events` dependency.

Improved test consistency and accuracy by refining test scripts.
Enhanced maintainability by cleaning up the code and resolving dependency issues.
This ensures a smoother testing process, leveraging real user interactions.
- Changed `module.exports` to `export default` in `cypress/plugins/index.js`.
- Updated and moved several dependencies between `dependencies` and
`devDependencies` in `package-lock.json` and `package.json`.
- Added `scan` to dependency array in `Job.jsx`.
- Fixed destructuring formatting in `PreviousJobs.jsx`.

The inclusion of `scan` in `Job.jsx` ensures the effect runs reliably.
- Updated `upload-artifact` action from `v3` to `v4` in `test.yaml`.
- Ensured consistent use of the `v4` version for two occurrences.
- Corrected the formatting, adding a newline at the end of the file.

This change ensures compatibility with the latest features and security enhancements offered by the updated versions of these GitHub Actions. Keeping the YAML file neatly formatted improves readability and maintainability.
- Replaced `require` with `import` in `cypress.config.js` 📦
- Removed custom command `assertValueCopiedToClipboard` from `deciphon.test.js`
- Introduced `clipboard` utility to handle clipboard actions in `commands.js`
- Adjusted download link selection in `deciphon.test.js` for better accuracy
- Updated test script in `package.json` to remove browser dependency
- Added `id` attribute to `article` in `Snap.jsx` for precise element targeting

Reason for changes:
- Migrated to ES6 modules for improved compatibility and cleaner syntax.
- Simplified clipboard handling by utilizing a singular robust utility.
- Enhanced test reliability by improving element selection logic.
- Removed hard dependency on Chrome to enable broader testing capability.
- Implemented semantic identifiers for maintainability and future-proofing.

This will streamline test integration and improve test reliability. 🛠️
- Renamed `cypress.config.js` to `cypress.config.mjs` 📦

The file extension was changed to follow ES module standards, ensuring compatibility
with modern JavaScript tooling and practices.
- Updated `deciphon.test.js` to ensure `icon-copy` is only clicked if enabled.
- Added a `timeout` in selectors for enhanced control in test reliability.
- Replaced `<div>` with `<>` fragments in `Snap.jsx` to simplify the structure.
- Introduced `useState` and `useEffect` in `SnapCopier` to manage data fetching.
- Simplified `onClick` function for better readability and functionality.

The changes optimize the testing process by ensuring the button state is checked
before interaction, reducing flakiness. In `Snap.jsx`, the improvements lead
to a more readable and maintainable code base and enhance user interactions
with clear feedback and efficient state management. 🚀
- Updated `DatabaseSelection.jsx` to add `style={{ paddingLeft: "2px" }}`
to radio item component.

This change enhances the aesthetic alignment in the UI, providing a more
consistent and visually pleasing layout for users.
- Removed `ReactDOM.render` and used `createRoot` for rendering.
- Adjusted imports to suit latest React standards.
- Fixed formatting in import statements in `src/index.js`.

The changes ensure compatibility with React 18, particularly by using the
new `createRoot` method from `react-dom/client` for optimal rendering.
Additionally, import statement adjustments enhance code readability and
adherence to style conventions.
- Renamed `hasTextEntered` to `hasText` for clarity in `QuerySequence.jsx`.
- Added `lodash.has` for safe error handling.
- Adjusted conditionals to clear errors when no text is present.
- Streamlined error badge rendering logic.
- Updated button logic to utilize `hasText` state.

Avoid flickering and implement robust error handling.
- Deleted `public/index.css` and removed its reference from `index.html`.
- Updated CSS links in `index.html` for EBI theming and deferred loading.
- Added custom styles directly in `index.html` for faster rendering.
- Removed redundant styling from `src/App.css` and consolidated styles.
- Introduced `midheight` class in `src/App.css` for consistent section height.
- Extracted footer component to `Footer.jsx` for reusability.
- Updated `About.jsx`, `Job.jsx`, `Query.jsx`, and `Snap.jsx` to use the new `Footer` component.
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.

1 participant