Repository navigation
Bound the vehicle menu's width in the top bar - #468
Merged
Merged
Conversation
The bar gave the vehicle menu the class that bounds it, but the menu's root is a v-menu, which hands its attributes to its overlay: the button kept its whole label, and a long one (a Polestar 4's variant) pushed the account's menu out of the bar, on a desktop window as on a phone. The bound now has an element of its own around the menu, so that the label truncates and the account's menu stays in reach. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Caution Review failedThe pull request is closed. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A long vehicle label (a Polestar 4's variant: "Polestar 4 Long Range Single Motor / Dual Motor (coupé and SUV) · 2024") pushed the account's menu out of the top bar, so that it could no longer be clicked, on a desktop window as on a phone.
The bar already bounded the vehicle menu (
.picker:max-inline-size: 26rem,min-inline-size: 0, shrinkable), but it gave that class toVehicleMenu, whose root is av-menu: Vuetify hands its attributes to the overlay, not to the button. The class never reached the bar, and the button kept its whole label (577 px). The bound now has an element of its own around the menu, so that the label truncates (itstext-truncatewas there already) and the account's menu stays in reach.Changes
AppShell.vue:VehicleMenuwrapped in adiv.picker, the bound unchanged.AppShell.test.ts: the vehicle menu's button lies within the bound (fails without the change).Screenshots
A Polestar 4 of the simulator (
polestar2scenario, variantps4-2024chosen), the bar of the vehicle's page. Before: in a 760 px desktop window the account's button starts at 743 px, beyond reach; on a Pixel 7 (412 px) the bar overflows the page and the button sits at 458 px. After: the label is cut at 416 px (26rem) on a desktop window, at the width left on a phone, and the account's button is in view and clickable (also checked at 620 and 320 px).Tests
task web-lint: passes (2 warnings, pre-existing).task web-test: 2071 tests pass, coverage unchanged.task unit-go,task integration,task system(no Go change; left to the CI).Closes #466
🤖 Generated with Claude Code