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

Success Alerts in Record App #2524

Open
jrchudy opened this issue Aug 20, 2024 · 4 comments
Open

Success Alerts in Record App #2524

jrchudy opened this issue Aug 20, 2024 · 4 comments
Assignees
Labels
discussion required requires a discussion before moving forward help wanted Intended for internal use for student workers

Comments

@jrchudy
Copy link
Member

jrchudy commented Aug 20, 2024

Background

The current implementation of record app, shows success alerts when a pure and binary table has records added to it ("Link records" was used). Other actions on record app that modify the contents of the page don't show an alert. Those actions include:

  • related table - "Add records"
    • refresh content on record page after create succeeds and page is focused
    • can show alert when this content is updated
  • related table - "Edit"
    • refresh content on record page edit create succeeds and page is focused
    • can show alert when this content is updated
  • main record - "Edit"
    • changes current record page to recordedit and shows that record page again after completing the edit
  • related table - "Bulk edit"
    • changes current record page and shows resultset view
    • issue Rob asked about for having a "Back" button to go back to the record page that initiated this workflow

This behavior to show an alert is removed in issue #2273 to be consistent with what we are currently doing for these other actions.

Task

This issue is for improving the "alerts" on record app to communicate changes more accurately when a user uses the actions on record page that "refresh" content for the user. The content that is refreshed happens "silently" with spinners on the sections that are updated but could easily be missed.

The alert should include information about:

  • which related table was updated
    • like the reference.displayname that was used in the success alert for P&B before
  • how many rows were added (or updated)
  • If an alert for the current related table is still on the page, that one should be updated (increment/decrement count) instead of adding another alert.

Alerts should be added when the page is focused again and we are "fetching" data. This happens for

  • "Add records"
  • single edit for a row in a related table
  • Should we change the alert if fetching the data fails?
    • maybe change to a warning alert (yellow instead of green) and suggest refreshing the page

Other UX changes

If we have multiple alerts on the page, this can eventually change the main content area to be very small making it hard to interact with the app unless the user clears the alerts. We need to explore the following:

  • How can we stack/collapse alerts?
    • should they stack by default? Or should we provide a mechanism to collapse them all into a "stack"?
  • if collapsed, how should we communicate how many there are?
    • show a notification circle with a number in it for the total number of alerts visible
  • Provide a way to "Clear all Alerts"?
    • should we have an option to clear only success alerts?
  • spacing for alerts can be reduced
    • reduce padding in the alert itself
    • reduce white space in between alerts

other pages/places

We have other pages where content can be added/updated where the main page opens a tab and then refreshes then content when focused again. These places include:

  • the Recordset page when "Create" is clicked
  • The edit button for a row on recordset page
  • "Create new" in a recordset modal
    • when doing "Link records" for pure and binary
    • foreign key modal popup
    • modal picker in a facet when clicking "Show Details"
@jrchudy jrchudy added the help wanted Intended for internal use for student workers label Aug 20, 2024
@KenyShah24
Copy link
Contributor

Here are the different UI approaches we can implement to enhance how we convey messages to users:

UI Options:

  1. Toast Alert:
    A small, non-intrusive toast notification at the top-right or bottom-right of the screen.
Alert_toast
  1. Fixed Notification Bar:
    A persistent notification bar at the top of the page, similar to the current setup for general alerts.
Screenshot 2024-09-10 084811

Toast notifications are commonly used in apps with real-time updates, but applications like Gmail, Netflix, and Amazon tend to use top-fixed, dismissible, or auto-fading alerts, making it a widely adopted practice. Below are some UI examples for displaying global alerts:

Alert with Title on Top:
Alert_title

Alert Highlighting Important Table Updates:
Screenshot 2024-09-10 084732

Content Example:
"Data for [Table Name] has been successfully updated. [X] new rows have been added."

UX Considerations:

  1. Incremental Alerts:
  • Instead of stacking multiple alerts for the same table updates, we could consolidate them, e.g.,
    "Data for [Table Name] has been updated: [X] new rows added, [Y] rows modified."
  1. Collapsible Alerts:
  • Another approach could be collapsible alerts that append updates for the same table, allowing users to expand the details as needed.
Alert_multiple_collapse

For Color/Visuals we can use standard badge background: Green for successful updates, yellow for warnings, red for errors. But with either dismissible, collapsible or undo/retry options if needed per what kind of scenario we are implementing it on (For eg. Add records, link/unlink records, edit)

@KenyShah24
Copy link
Contributor

Here are the solutions we discussed and how they address the two main concerns: (1) avoiding content shift, and (2) not reducing the workspace.

1. Grouping alerts into a collapsible alert:

  • Partially solves the space issue by reducing the space taken by multiple individual alerts.
  • However, it might cause content to shift when the alerts are expanded.
  • Additionally, presenting a large amount of information at once may overwhelm users, as they might not want to read all the details at once.

2. Adding a "Delete All" option:

  • This addresses the inconvenience of having to manually close each alert individually.
  • However, it doesn't solve the main issue of reducing workspace or preventing content shift.

3. Fade-away stacked alerts:

  • This solution fully addresses both concerns.
  • The alerts will appear temporarily, without shifting or shrinking the content, as they will float above the page (using a higher z-index).
  • We can limit the number of visible alerts to 3 at a time, with the most recent ones at the top.
  • Alerts will disappear after a set timeout (e.g., 2 seconds), ensuring minimal interruption to the user’s workspace.

4. Having a 'Donot notify me' option to suppress alerts:

  • Users who find alerts distracting/unnecessary can opt out of alerts allowing them to focus better which will again deal with both of the main concern.
  • With a config variable defined to set and disable these success alerts.
  • Question: Will there be any harm in doing this?

@KenyShah24
Copy link
Contributor

KenyShah24 commented Sep 26, 2024

--Collapsible Alerts Design Options--

We have explored several designs for collapsible alerts to handle success messages effectively. Below are the approaches and corresponding visuals:

-Current Implementation-
image

  1. Collapsible Alerts with Show More/Less Option:
Show_more
  1. Collapsible Alerts with Arrow Option:

Close State:
image
Open State:
open_collapse

  1. Collapsible Alerts with Bullet Points:
image
  1. Collapsible Alerts without the Success Title:
Screenshot 2024-09-26 095441

--Different Styles for the Alert Message--

  • We can try different colors which looks consistent and more prominent to make this message highlighted for the important information to the user.

Style1:
style_2

Grid Style (Better Readability):
style_3_grid

Wrapping message when table name is long:
image

image

--Message Formations and Placements of Words--

  1. Action First: [14:02] Successfully linked 10 records in accommodation_image table
  2. Number of Records Highlighted: [14:00] 10 records in accommodation_image table have been successfully linked.
  3. Highlight the action first: [14:00] Linked 10 records to the accommodation_image table successfully.
  4. Short and to the point: [14:00] 10 records linked in accommodation_image table.
  5. Structured format for logs or technical reports: [14:00] Action: Linked | Records: 10 | Table: accommodation_image
message_formation image image

@KenyShah24
Copy link
Contributor

This alert will display upon successful completion of user actions such as link, unlink, add, and single edit.
(Note: This will not appear for bulk-edit, bulk-delete actions, or for delete actions, as delete has its own summary alert.)

Here are some design improvements for collapsible alerts, as discussed:

  1. Showing more/less option with title :
Screenshot 2024-10-08 124859 Screenshot 2024-10-08 113200
  1. Showing more/less option without title:
Screenshot 2024-10-08 124703 Screenshot 2024-10-08 113004
  1. Showing collapse arrow :
Screenshot 2024-10-08 112833 Screenshot 2024-10-08 125744

--Few success alert title options that can accommodate all the success actions are:

  1. Action Completed
  2. Successfully Updated
  3. Update Successful
  4. Records Updated Successfully
  5. Action Completed Successfully
Screenshot 2024-10-08 105611 Screenshot 2024-10-08 105638 Screenshot 2024-10-08 105704 Screenshot 2024-10-08 105753 Screenshot 2024-10-08 105135

@RFSH RFSH added the discussion required requires a discussion before moving forward label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion required requires a discussion before moving forward help wanted Intended for internal use for student workers
Projects
None yet
Development

No branches or pull requests

3 participants