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

Prevent the route announcer from being visible #8977

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Nov 1, 2023

Changes

  • Moves the styles from the external viewtransition.css stylesheet into the component itself.
  • viewtransition.css is only added if there are uses of the transition: directives. In apps that do not use those, the styles are never added.
  • So to ensure that the route announce styles are on the page, the styles should be in the component. Should have been here in the first place!

Testing

  • Test added

Docs

N/A, bug fix

Copy link

changeset-bot bot commented Nov 1, 2023

🦋 Changeset detected

Latest commit: c642708

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Nov 1, 2023
@@ -7,7 +7,20 @@ export interface Props {

const { fallback = 'animate' } = Astro.props as Props;
Copy link
Member

@Princesseuh Princesseuh Nov 1, 2023

Choose a reason for hiding this comment

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

Unrelated to this PR, but is the as Props needed? Our tooling should take care of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was when I worked on vscode 😡

@matthewp matthewp merged commit 40a0616 into main Nov 1, 2023
13 checks passed
@matthewp matthewp deleted the vt-announcer-styles-leak branch November 1, 2023 17:11
@astrobot-houston astrobot-houston mentioned this pull request Nov 1, 2023
natemoo-re pushed a commit that referenced this pull request Nov 22, 2023
* Prevent the route announcer from being visible

* Update the number of expected styles in the tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants