hlxsites / vg-macktrucks-com

Franklin site for https://www.macktrucks.com
Apache License 2.0
1 stars 27 forks source link

NFR: Alert for content editors on incorrect block usage (2) #624

Closed cogniSyb closed 2 weeks ago

cogniSyb commented 6 months ago

We should display an alert on environments when the content editor adds a v2 block on the page that is not a v2-redesign page. This will allow incorrect use of a component to be spotted more quickly and reduce errors and questions in the future.

We should display an alert on environments when the content editor adds section modifier on the page that is not allowed on a v2-redesign page. This will allow incorrect use of section modifiers to be spotted more quickly and reduce errors and questions in the future. This is #622

This issue is related (part two of) to https://github.com/hlxsites/vg-volvotrucks-us/issues/539

Requirements

Allowed blocks

On both redesign pages and non-redesign pages, the following blocks are allowed:

Section modifiers for redesign

Section modifiers for regular pages

These might have adverse effects on redesign pages/

AsmitKMishra commented 1 month ago

Testing complete. Feature works for redesign page. There is a notification explaining if incorrect blocks or section modifiers are used. Legacy blocks mentioned in the issue as exceptions do not create the notification. Similarly for regular page, presence of v2 blocks creates the notifications. Section modifiers from above list work as expected. Screenshots are attached for reference.

notification-legacy notification-redesign