Collapse custom locations into a filterable list - #5765
Open
fatihemre wants to merge 1 commit into
Open
Conversation
The Custom Locations tab rendered every location fully expanded, which becomes unusable once a host has more than a handful of them. Each row is now a collapsible card showing its path and forward target, collapsed by default, with the Add Location button moved to the top so it stays reachable without scrolling to the end of the list. A filter appears once there are five or more locations and matches on the path as well as the forward scheme, host and port. New locations are still appended to the end of the list, so the generated nginx config is unchanged. Also fixes two existing issues in this component: the per-location inputs shared the same DOM ids across rows, and the advanced-config toggle state was keyed by array index, so removing a location moved it onto the wrong row.
|
Docker Image for build 1 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
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.
Why
The Custom Locations tab renders every location fully expanded. That is fine for one or two, but it does not scale: on a host with ~30 locations the tab becomes a very long wall of identical field groups, and the "Add Location" button sits at the very bottom, so adding one more means scrolling past everything else every time.
This reworks the tab into a collapsible list, staying within the existing Tabler components already used elsewhere in the app (
card,card-header,input-group,btn-action,badge-free muted icon) — no new dependencies and no new design language.BEFORE

AFTER

What changed
http://10.0.0.1:8080) so the list can be scanned without opening anything.btn-action) instead of a plain<a href="#">Delete</a>link.aria-label.<Form>does not setnoValidateand hiddenrequiredinputs would silently block submit.Two existing bugs fixed along the way
location-forwardHost, etc.) on every row, so every<label for>pointed at the first row's input.Not changed
No API, backend or generated-config changes. Only
frontend/src/components/Form/LocationsFields.tsx, its CSS module, and two locale files (en.json,tr.json).Type of Change
AI Usage