Skip to content

Instantly share code, notes, and snippets.

@rotimi-best
Created July 23, 2026 15:23
Show Gist options
  • Select an option

  • Save rotimi-best/44e458c77802c9065957040a2a6aa3be to your computer and use it in GitHub Desktop.

Select an option

Save rotimi-best/44e458c77802c9065957040a2a6aa3be to your computer and use it in GitHub Desktop.
Brainstorming ideas for highlighting sections on classroomio pages
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