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

feat(quantic): make quantic notifications component dismissible #4733

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SimonMilord
Copy link
Contributor

@SimonMilord SimonMilord commented Nov 27, 2024

SFINT-5767

IN THIS PR:

  • Fixed a styling issue we had with the notifications where the width would look weird.
  • Made the quantic notifications component dismissible, thus following best practices by Salesforce and offering a better user experience.

More about the solution:

The QuanticNotifications component was rendering the notifications based on the notifications array it was getting from the notify trigger state from headless. We are therefore adding a button to close the notification in the template, which will call the handleNotificationClose handler function.

This function gets the id of the notification we want to close and filter it out of the array of notifications received from the state, leaving the other notifications.

Then, the code will call the updateState() method with the newly filtered out notifications, causing a re-render of the component.

DEMO STYLING:

Before:
Screenshot 2024-11-27 at 4 59 35 PM

After:
Screenshot 2024-11-27 at 4 58 33 PM

DEMO FUNCTIONALITY:

Screen.Recording.2024-11-27.at.5.16.42.PM.mov

TESTS:

// TODO

Copy link

Pull Request Report

PR Title

❌ Title should follow the conventional commit spec:
<type>(optional scope): <description>

Example: feat(headless): add result-list controller

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 242.6 242.6 0
commerce 347.3 347.3 0
search 413.8 413.8 0
insight 404.9 404.9 0
recommendation 254.9 254.9 0
ssr 407.3 407.3 0
ssr-commerce 362.3 362.3 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

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