Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workshop: CSS-driven journey-tag visibility for rendered step content #46720
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
Workshop: CSS-driven journey-tag visibility for rendered step content #46720
Changes from all commits
9ffe035f2ea7b0b0ce6b6File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/codebase-design] The closing paren for
rewriteJourneyBlocks(...)is mismatched —transformTables(rewriteJourneyBlocks(rewriteGfmTaskLists(rewriteGfmAlerts(sanitizeWorkshopHtml(html))))has four closing parens for five opening parens. The.replace(...)chain that follows is chained onrewriteJourneyBlocks's result, not on thetransformTablescall, meaningtransformTablesreceives only the raw string without heading/link/image rewrites.💡 Expected parenthesisation
If this compiles, verify whether the heading level-bumps, local-link rewriting, and asset-URL resolution are intentionally applied before
transformTables, or whether there is a missing closing paren that should wrap the entire chain.@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/codebase-design] The CSS hardcodes a closed list of journey tokens (
ui,terminal,local,codespace,copilot). Any new journey added to the manifest will be invisible without a corresponding CSS rule update — a silent failure mode.💡 Data-driven alternative
The
data-workshop-visible-journeysattribute already holds the active token list. A single attribute selector can match any token dynamically without enumerating every journey:Alternatively, document in a code comment that new journeys require a corresponding CSS rule, so it is not accidentally missed.
@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS visibility selectors hardcode the known journey names (
ui,terminal,local,codespace,copilot). Any workshop manifest that introduces a newcontentJourneyIdvalue will silently keep those blocks hidden — thedata-workshop-visible-journeysattribute will be updated correctly but no CSS rule will match.Consider generating the selectors dynamically in JavaScript (e.g., adding/removing a
is-visibleclass on the journey blocks themselves) rather than relying on a hardcoded CSS list, or at minimum add a comment here listing the known values so reviewers know to update this selector table when a new journey type is introduced.@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/codebase-design]
display: contentsis intentional for flow preservation, but it has a known browser accessibility-tree bug: the wrapper<div>is removed from the a11y tree, which can break landmark/list semantics for screen readers if journey blocks wrap<li>,<td>, or interactive elements.💡 Safer alternative
Use
display: block/display: none(the default already hides withdisplay: none; the reveal just needsdisplay: block). Since the<div>is a neutral wrapper,display: blockis safe and avoids the a11y issue:display: contentswould only be needed if journey blocks were placed inside flex/grid containers where an extra wrapper would break layout — verify that is actually the case before keeping it.@copilot please address this.
Uh oh!
There was an error while loading. Please reload this page.