Skip to content
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

Update Markdown preview examples to include tabindex #3330

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Feb 12, 2025

What are you trying to accomplish?

  • Updates Markdown preview examples to include tabindex to ensure horizontal overflow region can be scrolled with keyboard.
  • Adds a note that this component is purely presentational.

List the issues that this change affects.

Relates to:

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Given this component is purely presentational, I hesitate to add JS behaviors to it since it's already used in places that might already be providing JS behaviors. I opted to add a warning to have the consumer handle adding JS behaviors. For example, dotcom has a JS script to handle overflowing tables. (Note: we are still not handling overflow code blocks and I've started a convo with the relevant team. See this discussion thread).

Anything you want to highlight for special attention from reviewers?

Does this approach sound reasonable?

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Copy link

changeset-bot bot commented Feb 12, 2025

⚠️ No Changeset found

Latest commit: dcaba31

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@khiga8 khiga8 added the skip changeset Pull requests that don't change the library output label Feb 13, 2025
@khiga8 khiga8 marked this pull request as ready for review February 13, 2025 17:50
@khiga8 khiga8 requested a review from a team as a code owner February 13, 2025 17:50
Copy link
Contributor

@TylerJDev TylerJDev left a comment

Choose a reason for hiding this comment

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

LGTM, with non-blocking comment.

Also thank you for starting that discussion. It would be great if we could also improve the code blocks!

@@ -47,7 +47,7 @@ class MarkdownPreview < ViewComponent::Preview
<h6>Header 6</h6>
<table>
<table tabindex="0">
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that this table and the second one are smaller than the last table. Do we still need tabindex on them? Wasn't sure if the scrollbar still appears 🤔

TylerJDev

This comment was marked as duplicate.

@khiga8 khiga8 enabled auto-merge (squash) February 14, 2025 19:03
@khiga8 khiga8 merged commit a2442cc into main Feb 14, 2025
34 checks passed
@khiga8 khiga8 deleted the kh-fix-markdown-batch branch February 14, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset Pull requests that don't change the library output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants