Skip to content

Conversation

@gabrielcaires
Copy link
Contributor

@gabrielcaires gabrielcaires commented Sep 26, 2025

Close CML-849

Proposed Changes

  • Show list of sites
  • Enable search sites
  • Enable configuration of different stream channels: Web, Email, and device Notifications.
  • Enable the application of the same settings to all sites (by stream channel)

Testing Instructions

[I recommend testing it running in your local env and using a non-A8C to not mess with your notification settings)

  • Go to /v2/me/notifications/sites
  • In another tab, open the legacy version (https://wordpress.com/me/notifications)
  • Search a site on both versions
  • Change at least one option by tab on the new version (Web/Email/Devices)
  • [New Version] After you see a notification confirming the change was saved, check if the changes are applied to the old version
  • Use the Apply to all settings (Pay attention to not mess with your configurations)
  • Check if all other sites follow the same configuration you applied in the previous step.

Screenshots

Regular (First site doesnt have site name)

CleanShot 2025-09-30 at 15 38 18@2x

No site found

CleanShot 2025-09-30 at 15 38 41@2x

Opened site

CleanShot 2025-09-30 at 15 39 08@2x

@matticbot
Copy link
Contributor

matticbot commented Sep 26, 2025

@gabrielcaires gabrielcaires marked this pull request as ready for review September 30, 2025 14:39
@gabrielcaires gabrielcaires requested a review from a team as a code owner September 30, 2025 14:39
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Sep 30, 2025
@gabrielcaires
Copy link
Contributor Author

@lucasmendes-design Do you think we should show a modal warning the users if they click on the "Apply to all sites" without reading it? I got myself doing it, thinking it was a regular save button.

@gabrielcaires gabrielcaires requested a review from a team September 30, 2025 14:41
@gabrielcaires gabrielcaires self-assigned this Sep 30, 2025
@lucasmendes-design
Copy link

I got myself doing it, thinking it was a regular save button.

I think it's because we're very used to clicking on the save button, and since we don't have a pattern, adding a modal can help with this. Here is a suggestion:

image

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucasmendes-design do we have design for this page? In the current form, the UI and interactions in this page looks a bit off compared to the rest of HD pages 🤔

...userNotificationsSettingsMutation(),
meta: {
snackbar: {
success: __( 'Settings saved successfully.' ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have guidelines re: snackbar copy, please take a look 😄

@lucasmendes-design
Copy link

lucasmendes-design commented Oct 1, 2025

do we have design for this page? In the current form, the UI and interactions in this page looks a bit off compared to the rest of HD pages 🤔

What do you mean? @fushar

The latest is here:
cTJYw7IO5DvX7XclXAmzJd-fi-672_16921

@lucasmendes-design
Copy link

The previous iteration is here:
cTJYw7IO5DvX7XclXAmzJd-fi-1_4

But we needed to move away from this since @gabrielcaires was giving some feedback regarding the UI and how our current components work.

@fushar
Copy link
Contributor

fushar commented Oct 1, 2025

What do you mean? @fushar

The latest is here:
cTJYw7IO5DvX7XclXAmzJd-fi-672_16921

Oops, I missed that, sorry!

My feedback is that for a12s who have hundreds of sites, that page will:

  • be blank for a few seconds without any loading indicator (to load the site list)
  • will be super long because it shows all site cards without pagination

@gabrielcaires gabrielcaires force-pushed the update/cml-879-enable-configure-notification-settings-by-site branch from d0933a6 to 70f69bc Compare October 1, 2025 14:15
@lucasmendes-design
Copy link

My feedback is that for a12s who have hundreds of sites, that page will:
be blank for a few seconds without any loading indicator (to load the site list)
will be super long because it shows all site cards without pagination

It's fair feedback. For users who have multiple sites, they can search for a website using the search input. The pagination, though, is a good solution to make this page faster. Is it possible to add?

Also, this scenario you just described is very rare for real users.

@gabrielcaires
Copy link
Contributor Author

gabrielcaires commented Oct 1, 2025

It's fair feedback. For users who have multiple sites, they can search for a website using the search input. The pagination, though, is a good solution to make this page faster. Is it possible to add?

@lucasmendes-design and @fushar

We can add a skeleton to be displayed while the list of sites is still loading; it is easy to implement.

Regarding the pagination, I suggest moving it to the next iteration, considering it is an edge case that will require building backend changes to support pagination and search (the search is happening directly on the frontend).

My concern is that the project is already ahead of the expected target date, so it is better to increase the scope only when we have a critical case.

@gabrielcaires
Copy link
Contributor Author

I think it's because we're very used to clicking on the save button, and since we don't have a pattern, adding a modal can help with this. Here is a suggestion:

@lucasmendes-design Modal applied, thanks

CleanShot 2025-10-01 at 16 17 37@2x

@gabrielcaires
Copy link
Contributor Author

gabrielcaires commented Oct 1, 2025

I updated the PR with an initial loading stat. We can improve it if we want further PRs (just to not block this one)
@lucasmendes-design and @fushar

I used the same spinner we are using on the /site table.

CleanShot.2025-10-01.at.16.55.33.mp4

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a skeleton to be displayed while the list of sites is still loading; it is easy to implement.

Regarding the pagination, I suggest moving it to the next iteration, considering it is an edge case that will require building backend changes to support pagination and search (the search is happening directly on the frontend).

Fair points. Agree to both points.

The code looks good. I left a small comment. 👍

.eslintrc.js Outdated
'__experimentalDivider',
'__experimentalGrid',
'__experimentalHStack',
'__experimentalBadge',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is actually being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, thanks!

@lucasmendes-design
Copy link

I used the same spinner we are using on the /site table.

Do we use them across the product? I thought we would remove it.

<CardBody>
<HStack>
{ header }
<Button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be accessible.

Some issues:

  • Button needs an aria-label.
  • Need to communicate aria-expanded state.
  • Need to connect the button to the content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I will do it in the next PR because this one is already too big.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! Maybe consider moving this to the component folder as well. I know working on the performance tab, I was looking for something with this functionality.

@gabrielcaires
Copy link
Contributor Author

gabrielcaires commented Oct 2, 2025

Do we use them across the product? I thought we would remove it.

@lucasmendes-design Yes, it is used across multiple components on the new hosting dashboard screen. It may be difficult to see because we have an aggressive cache strategy, but you can view it more clearly if you delete this record from your developer tools > Application > LocalStorage and reload the page.

CleanShot 2025-10-02 at 13 34 08@2x

@gabrielcaires gabrielcaires merged commit cfd1375 into trunk Oct 2, 2025
12 checks passed
@gabrielcaires gabrielcaires deleted the update/cml-879-enable-configure-notification-settings-by-site branch October 2, 2025 14:59
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 2, 2025
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.

6 participants