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

ino-snackbar: add open property #1319

Closed
5 tasks
janivo opened this issue Mar 14, 2024 · 0 comments · Fixed by #1320
Closed
5 tasks

ino-snackbar: add open property #1319

janivo opened this issue Mar 14, 2024 · 0 comments · Fixed by #1320
Assignees

Comments

@janivo
Copy link
Collaborator

janivo commented Mar 14, 2024

Context

Currently, managing the visibility of the ino-snackbar component involves manual destruction and rendering of a new snackbar instance. This contrasts with our ino-dialog component, which offers the capability to control visibility using the 'open' property. To enhance consistency and usability across components, we aim to update the ino-snackbar component to include an open property, allowing users to control its visibility programmatically.

Acceptance Criteria

  • The ino-snackbar component exposes an 'open' property to control its visibility.
  • Setting the 'open' property to true displays the snackbar to the user.
  • Setting the 'open' property to false hides the snackbar.
  • The component emits an event (use hideEl) to notify the user when the snackbar intends to hide itself.
  • The behavior of the ino-snackbar component is consistent with other components, such as ino-dialog, regarding visibility management.

Test Cases

  1. Display Snackbar Test

    • Scenario: User sets the 'open' property to true.
    • Expected Result: The snackbar is displayed to the user.
    • Steps:
      1. Set the 'open' property of the snackbar to true.
      2. Verify that the snackbar is visible on the screen.
  2. Hide Snackbar Test

    • Scenario: User sets the 'open' property to false.
    • Expected Result: The snackbar is hidden from the user.
    • Steps:
      1. Set the 'open' property of the snackbar to false.
      2. Verify that the snackbar is no longer visible on the screen.
  3. Auto-Hide Snackbar Test

    • Scenario: Snackbar auto-hides after a specified timeout.
    • Expected Result: The snackbar hides automatically after the timeout.
    • Steps:
      1. Set the 'open' property of the snackbar to true.
      2. Wait for the specified timeout duration.
      3. Verify that the snackbar is hidden automatically.
  4. Snackbar Hide Event Test

    • Scenario: User interacts with the snackbar to hide it.
    • Expected Result: The snackbar emits a hide event.
    • Steps:
      1. Set the 'open' property of the snackbar to true.
      2. Interact with the snackbar to trigger its hide action (e.g., click on the close button).
      3. Verify that the snackbar emits a hide event.
@github-actions github-actions bot added the new This issue has been recently added and has no estimation label Mar 14, 2024
@janivo janivo removed the new This issue has been recently added and has no estimation label Mar 14, 2024
@TobiasHeimGalindo TobiasHeimGalindo self-assigned this Mar 14, 2024
TobiasHeimGalindo added a commit that referenced this issue Apr 4, 2024
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 a pull request may close this issue.

2 participants