-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement Snackbar
component
#6
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement the Snackbar component to handle snackbar creation and removal based on the provided configuration. The Snackbar class consists of a constructor method that initializes the configuration, a create method to create snackbars, and a remove method to remove snackbars. This implementation ensures that the provided configuration is verified before creating or removing snackbars.
chessurisme
force-pushed
the
feature/snackbar
branch
from
May 16, 2024 00:53
b6d43f4
to
17642a4
Compare
Replaced the `createSnackbar` method with the `renderSnackbar` method in the Snackbar class to streamline the process of rendering. Directly rendering the Snackbar makes more sense and reduces complexity when using the Snackbar class.
Removed an unnecessary parameter from the `removeSnackbar` method to streamline its implementation and improve clarity.
Merged the render and remove methods in the Snackbar class to simplify its interface and enhance clarity. The unnecessary parameter has been removed, resulting in a more streamlined and user-friendly implementation.
This feature introduces a new function for rendering a snackbar message and then automatically removing it after a certain duration. The function combines the rendering and removal processes into a single action, enhancing usability and reducing complexity.
Updated import paths in component files to use module resolution aliases defined in jsconfig.json. This change improves code readability and maintainability by replacing relative paths with aliases.
Combine multiple test files into a single test file to reduceunnecessary module tests. This change simplifies navigation and improvescodebase organization.
Add tests to verify that the Snackbar component correctly renders and removes messages with valid configurations.
Just like the Button component, Snackbar's files were merged into one single file. There are so many changes happening while editing into a single file. Here are some:
Impressive! ❤️ |
chessurisme
added a commit
that referenced
this pull request
Jun 18, 2024
* feat: implement Snackbar component Implement the Snackbar component to handle snackbar creation and removal based on the provided configuration. The Snackbar class consists of a constructor method that initializes the configuration, a create method to create snackbars, and a remove method to remove snackbars. This implementation ensures that the provided configuration is verified before creating or removing snackbars. * refactor: replace create method with render method Replaced the `createSnackbar` method with the `renderSnackbar` method in the Snackbar class to streamline the process of rendering. Directly rendering the Snackbar makes more sense and reduces complexity when using the Snackbar class. * refactor: remove unnecessary parameter Removed an unnecessary parameter from the `removeSnackbar` method to streamline its implementation and improve clarity. * refactor: merge render and remove methods Merged the render and remove methods in the Snackbar class to simplify its interface and enhance clarity. The unnecessary parameter has been removed, resulting in a more streamlined and user-friendly implementation. * feat: add render then remove snackbar function This feature introduces a new function for rendering a snackbar message and then automatically removing it after a certain duration. The function combines the rendering and removal processes into a single action, enhancing usability and reducing complexity. * refactor: update import paths for module resolution Updated import paths in component files to use module resolution aliases defined in jsconfig.json. This change improves code readability and maintainability by replacing relative paths with aliases. * test: merge test files into one Combine multiple test files into a single test file to reduceunnecessary module tests. This change simplifies navigation and improvescodebase organization. * test: ensure rendering and removal works properly Add tests to verify that the Snackbar component correctly renders and removes messages with valid configurations.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
❓ What type of PR is this?
💬 Description
This PR includes a
Snackbar
component class with methods of creation and removal.This is responsible for creating a snackbar in the DOM.
🎟️ Related Tickets & Documents
🃏 Added/updated tests?
We encourage you to keep the code coverage percentage at 90% and above.
📚 Resources for Reviewers
Snackbar
- https://github.com/free-bird-operation-project/quiz-manager/wiki/Snackbar🌿 What branch would you like to merge this into?
feature/components
📷 [optional] What gif best describes this PR or how it makes you feel?