Skip to content

docs(adev): fix mobile layout shift in API reference filters#67670

Closed
anushkasingh-commits wants to merge 13 commits intoangular:mainfrom
anushkasingh-commits:patch-5
Closed

docs(adev): fix mobile layout shift in API reference filters#67670
anushkasingh-commits wants to merge 13 commits intoangular:mainfrom
anushkasingh-commits:patch-5

Conversation

@anushkasingh-commits
Copy link
Contributor

What does this PR do?

Fixes a layout shift in the API Reference filters on mobile devices.

The filter container used justify-content: space-between, which caused elements to redistribute space when filters were toggled. This resulted in visible layout shifts and misalignment on smaller screens.

This change replaces space-between with flex-start and adds a small row-gap to maintain consistent spacing when items wrap.

Why is this change useful?

It prevents filter controls from jumping horizontally when their state changes, improving layout stability and usability on mobile devices.

Type of change

Documentation site styling improvement (no framework or runtime changes).

Improved wording to clarify how beginners can verify their environment and IDE are correctly set up after running the app.
…typically used to derive read-only state from other signals, `linkedSignal` is useful when the derived state should remain writable or preserve user-driven updates as its source changes. Use `linkedSignal` when the value depends on another signal but still needs to be explicitly set or updated in response to user interaction. Additionally, `linkedSignal` should be used when you need access to the previous state while reacting to a source signal.
@pullapprove pullapprove bot requested a review from MarkTechson March 13, 2026 02:24
@angular-robot angular-robot bot added the area: docs Related to the documentation label Mar 13, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 13, 2026
@JeanMeche JeanMeche removed the request for review from MarkTechson March 13, 2026 02:28
@pullapprove pullapprove bot requested a review from MarkTechson March 13, 2026 02:29
@JeanMeche JeanMeche requested review from JeanMeche and removed request for MarkTechson March 13, 2026 10:19
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

Deployed adev-preview for ec2a1d2 to: https://ng-dev-previews-fw--pr-angular-angular-67670-adev-prev-cqiie38c.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@hawkgs hawkgs linked an issue Mar 13, 2026 that may be closed by this pull request
Copy link
Member

@hawkgs hawkgs left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @anushkasingh-commits! Unfortunately, I don't think your change addresses the actual issue. Ideally, we would like the width of the filter chip to accommodate for the checkmark that appears in front of the text when the filter is selected. The chip text could also be centered. Would you be able to update that?

Also, adev is not a valid scope. Please rename your commit to docs(docs-infra): ... instead.

@anushkasingh-commits
Copy link
Contributor Author

Thanks for the feedback! I see what you mean about the checkmark causing the layout shift. I'll update the filter chip styling to reserve space for the icon and keep the text centered. I'll also rename the commit to use the correct scope. Working on the update now.

@angular-robot angular-robot bot added the area: docs-infra Angular.dev application and infrastructure label Mar 13, 2026
@hawkgs
Copy link
Member

hawkgs commented Mar 14, 2026

@anushkasingh-commits, there are no changes to review now. Also, all commits should be squashed into a single one.

@angular-robot angular-robot bot added area: build & ci Related the build and CI infrastructure of the project area: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime area: router area: devtools area: common Issues related to APIs in the @angular/common package area: forms requires: TGP This PR requires a passing TGP before merging is allowed labels Mar 14, 2026
Fix layout shift in the API reference filters on mobile devices.

Replaces `justify-content: space-between` with `flex-start`
to prevent filter elements from redistributing space when toggled.
Also adds a row gap to maintain spacing when items wrap.
@hawkgs hawkgs removed area: build & ci Related the build and CI infrastructure of the project area: common Issues related to APIs in the @angular/common package area: router area: core Issues related to the framework runtime area: forms area: compiler Issues related to `ngc`, Angular's template compiler area: devtools detected: feature PR contains a feature commit area: docs Related to the documentation requires: TGP This PR requires a passing TGP before merging is allowed labels Mar 15, 2026
@hawkgs
Copy link
Member

hawkgs commented Mar 16, 2026

@anushkasingh-commits, the diff contains unrelated code and at the same time doesn't contain the requested changes.

@hawkgs hawkgs removed the request for review from JeanMeche March 16, 2026 08:05
@alan-agius4 alan-agius4 added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 16, 2026
@JeanMeche
Copy link
Member

#67690 is closer to what to we would expect.

@JeanMeche JeanMeche closed this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews adev: preview area: docs-infra Angular.dev application and infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile layout shift in API Reference

4 participants