Skip to content

docs: snippet-based examples not showing after clicking away and coming back #31415

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

crisbeto
Copy link
Member

Fixes that examples based on snippets (e.g. first example for autocomplete) weren't showing up if the user lands on the page, clicks to another tab and then comes back.

The problem was that the timing is different on the second run, because we hit the cached rather than fetching the content. These changes resolve it by switching the component's internal state to signals.

@crisbeto crisbeto requested a review from a team as a code owner June 24, 2025 11:09
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jun 24, 2025
@crisbeto crisbeto requested review from adolgachev and mmalerba and removed request for a team June 24, 2025 11:09
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jun 24, 2025
…ng back

Fixes that examples based on snippets (e.g. first example for autocomplete) weren't showing up if the user lands on the page, clicks to another tab and then comes back.

The problem was that the timing is different on the second run, because we hit the cached rather than fetching the content. These changes resolve it by switching the component's internal state to signals.
@crisbeto crisbeto force-pushed the snippet-example-bug branch from 0dc4da0 to 1f4c861 Compare June 24, 2025 11:26
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 24, 2025
@crisbeto crisbeto merged commit d820a26 into angular:main Jun 24, 2025
23 of 25 checks passed
@crisbeto
Copy link
Member Author

The changes were merged into the following branches: main, 20.0.x

crisbeto added a commit that referenced this pull request Jun 24, 2025
…ng back (#31415)

Fixes that examples based on snippets (e.g. first example for autocomplete) weren't showing up if the user lands on the page, clicks to another tab and then comes back.

The problem was that the timing is different on the second run, because we hit the cached rather than fetching the content. These changes resolve it by switching the component's internal state to signals.

(cherry picked from commit d820a26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants