-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Leverage HTMX to simplify rendering of complex form fields #11891
Comments
I would like to take ownership of this issue please. |
@dhenschen I'm working on something related to this for cabling, so let me know any progress you get on this and I will let you know what I come up with. |
@arthanson, Are these the HTMX changes you were referencing: #12491 |
@dhenschen not that one, it was for cable terminations - I am still working on it in the background so no PR yet. |
@jeremystretch, I've identified the following templates that follow the same pattern as circuit termination and could potentially benefit from HTMX improvements:
To clarify the scope of this issue, would you like all forms that follow the same model as circuit termination to be updated as part of this issue? If so, would you prefer separate pull requests for each form to facilitate the review process? |
Associated with issue netbox-community#11891
Associated with issue netbox-community#11891
@arthanson, I've made progress on this issue and created a pull request at #12675. Regarding the implementation, I'm considering adding another database field to facilitate this UI change. It appears to be the cleanest approach so far, and it may enable us to perform additional validation on this and similar forms if desired. I would appreciate your input and guidance on whether this approach aligns with our objectives. Please review the pull request and let me know your thoughts. |
Associated with issue netbox-community#11891
Associated with issue netbox-community#11891
Associated with issue netbox-community#11891
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide. |
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary. |
Re-opening this as I believe it was closed in error. @jeremystretch do we still want to move forward with this? |
No; it's too broad. We'll need to open more detailed FRs scoping specific work to move this initiative forward. |
NetBox version
v3.4.5
Feature type
Change to existing functionality
Proposed functionality
#11625 introduced the ability to dynamically render object edit forms in response to changing field selections. We can leverage this new ability to simplify forms which have fields that can reference different types of related objects.
For example, the circuit termination edit form allows the user to select either a site or a provider network as the "attached" object:
When the "site" tab is selected, the three relevant fields (region, group, and site) are displayed. When the "provider network" tab is selected, these are replaced with two different fields (provider and provider network). All five of these fields are declared on the form, and the values of all five are sent when the form is submitted. This can be confusing to the user, especially when field validation error messages end up on a hidden tab (as in #11816, for instance).
We can change the tabs to a dropdown selection field that triggers the form to re-render automatically in response to the related object type changing, and return only the relevant fields.
Use case
This change will simplify the appearance of forms within the UI, obviating the need to hide some fields behind tabs. It will also eliminate the need for many of our custom form templates.
Database changes
No response
External dependencies
No response
The text was updated successfully, but these errors were encountered: