-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[VideoThumbnail] Fix validateDOMNesting warning #7911
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
Conversation
size-limit report 📦
|
1648afc to
c015e89
Compare
|
/snapit |
|
🫰✨ Thanks @bencmilton! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/plugin-polaris@0.0.0-snapshot-release-20221213223312yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20221213223312yarn add @shopify/polaris@0.0.0-snapshot-release-20221213223312yarn add @shopify/stylelint-polaris@0.0.0-snapshot-release-20221213223312 |
|
This change seems ok to me semantically. My one concern was accessibility support for assistive technologies: I tested with VoiceOver to confirm there weren't any unintended side effects with changing that I could use a second opinion so will tag in an accessibility engineer to weigh in |
menigk-shopify
left a comment
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.
LGTM. I see no regression in making this change from a
to
|
Great catch! Thank you for checking on the accessibility @yurm04 and @menigk-shopify! |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris@10.16.1 ### Patch Changes - [#7904](#7904) [`bdc62ebbb`](bdc62eb) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed a bug where responsive props would inherit values on Box - [#7911](#7911) [`b26408e2f`](b26408e) Thanks [@bencmilton](https://github.com/bencmilton)! - Fix validateDOMNesting warning in `VideoThumbnail` ## @shopify/plugin-polaris@0.0.22 ## polaris.shopify.com@0.27.3 ### Patch Changes - Updated dependencies \[[`bdc62ebbb`](bdc62eb), [`b26408e2f`](b26408e)]: - @shopify/polaris@10.16.1 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? There are two pretty loud `validateDOMNesting` warnings logged in development that seem to be originating from the `VideoThumbnail` component: <img width="712" alt="Screenshot 2022-12-13 at 5 14 02 PM" src="https://user-images.githubusercontent.com/9685204/207456198-d3b2a437-869a-4f9e-9441-44bbb851839e.png"> <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? I'm hoping that this extremely naive fix might just do the trick, but I have not tested this beyond storybook. If there are any considerations that I missed, please let me know. Visually, there does not appear to be a difference after the `p` is changed to a `div` **Before**: <img width="737" alt="Screenshot 2022-12-13 at 5 15 53 PM" src="https://user-images.githubusercontent.com/9685204/207456176-e05c764b-ff91-4d1b-9ad6-e119f9712de4.png"> **After**: <img width="737" alt="Screenshot 2022-12-13 at 5 15 40 PM" src="https://user-images.githubusercontent.com/9685204/207456189-bcb7913b-befd-46b9-999f-c23ee023295b.png"> <!-- ℹ️ Delete the following for small / trivial changes --> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) I added the snapshot to a Notebooks [spin instance](https://admin.web.video-thumbnail-fix.ben-milton.us.spin.dev/store/shop1/apps/development-notebooks-key/), where we have a `VideoThumbnail` component on the main index page. 1. Ensure that the `validateDOMNesting` warnings are now gone from the dev console 2. Ensure that the `VideoThumbnail` and timestamp in particular still works and appears the same as before the change ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris@10.16.1 ### Patch Changes - [Shopify#7904](Shopify#7904) [`bdc62ebbb`](Shopify@bdc62eb) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed a bug where responsive props would inherit values on Box - [Shopify#7911](Shopify#7911) [`b26408e2f`](Shopify@b26408e) Thanks [@bencmilton](https://github.com/bencmilton)! - Fix validateDOMNesting warning in `VideoThumbnail` ## @shopify/plugin-polaris@0.0.22 ## polaris.shopify.com@0.27.3 ### Patch Changes - Updated dependencies \[[`bdc62ebbb`](Shopify@bdc62eb), [`b26408e2f`](Shopify@b26408e)]: - @shopify/polaris@10.16.1 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>


WHY are these changes introduced?
There are two pretty loud

validateDOMNestingwarnings logged in development that seem to be originating from theVideoThumbnailcomponent:WHAT is this pull request doing?
I'm hoping that this extremely naive fix might just do the trick, but I have not tested this beyond storybook. If there are any considerations that I missed, please let me know.
Visually, there does not appear to be a difference after the
pis changed to adivBefore:

After:

How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
I added the snapshot to a Notebooks spin instance, where we have a
VideoThumbnailcomponent on the main index page.validateDOMNestingwarnings are now gone from the dev consoleVideoThumbnailand timestamp in particular still works and appears the same as before the change🎩 checklist
README.mdwith documentation changes