Created
July 23, 2026 15:23
-
-
Save rotimi-best/44e458c77802c9065957040a2a6aa3be to your computer and use it in GitHub Desktop.
Brainstorming ideas for highlighting sections on classroomio pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| goAndHighlight('ROUTE_NAME', 'section', { | |
| key: 'value' | |
| }); | |
| enum ROUTE_NAME { | |
| COURSE='/course/[id]' | |
| COURSE_SETTINGS='/course/[id]/settings' | |
| COURSE_CERTIFICATE | |
| } | |
| export ROUTE_SECTIONS = { | |
| 'COURSE_SETTINGS': { | |
| 'PUBLISH': 'publish' | |
| } | |
| } | |
| sectionName should be an object from the routename | |
| function goAndHighlight(routeName: ROUTE_NAME, sectionName, routeValues) { | |
| // loop through keys of routeValues | |
| for {const routeValue in routeValues} {} | |
| // replace key in `routeName` with the value | |
| // add `?highlight` with the sectionName | |
| } | |
| multiple pages | |
| each page has sections | |
| and their ids should be unique | |
| BEFORE goto('/course/{id}/settings?highlight=publish') | |
| AFTER goAndHighlight('COURSE_SETTINGS', 'publish', { id: 'some-uuid', certificateId: '', soId: '' }) | |
| // ideally active should be types to section name | |
| <AttentionHighlight | |
| active="sectionName" | |
| > | |
| <some component here> | |
| </AttentionHighlight> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment