Skip to content
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

Remember user preference to show/hide device type images in rack views #5203

Closed
hoalex opened this issue Oct 2, 2020 · 9 comments
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@hoalex
Copy link

hoalex commented Oct 2, 2020

Environment

  • Python version: 3.6.8
  • NetBox version: 2.9.3

Proposed Functionality

It would be nice if the value of the "Show images" setting on a rack view could be persisted as a user preference (using the mechanism introduced in #3294).

Use Case

We are making use of device type front/rear images on most of our devices in Netbox. By default, Netbox will render these images in a rack view, except when the user toggles the "Show images" button.
However, this is only valid for the current view -- as soon as another rack view is opened, or the current page is refreshed, Netbox falls back to the default mode, i.e. showing images.

Some users may not see any use in the images, and prefer to always see the name and device type color instead. Having a dedicated user preference key for this setting would allow for this functionality.

Database Changes

none

External Dependencies

none

@DanSheps DanSheps added status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application labels Oct 2, 2020
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Oct 2, 2020
@jeremystretch
Copy link
Member

Reminder for whoever takes this on: Be sure to record the chosen preference name in docs/development/user-preferences.md.

@jeremystretch jeremystretch self-assigned this Oct 2, 2020
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 2, 2020
@jeremystretch jeremystretch removed their assignment Oct 2, 2020
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: accepted This issue has been accepted for implementation labels Oct 2, 2020
@stale
Copy link

stale bot commented Nov 16, 2020

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. Please see our contributing guide.

@stale stale bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Nov 16, 2020
@ogorov
Copy link

ogorov commented Nov 17, 2020

I could try to solve this issue.

@stale stale bot removed the pending closure Requires immediate attention to avoid being closed for inactivity label Nov 17, 2020
@jeremystretch
Copy link
Member

@ogorov but will you? If you're willing to commit to the work, I'll assign this to you. Otherwise, I'm going to re-apply the "pending closure" label.

@ogorov
Copy link

ogorov commented Nov 17, 2020

@jeremystretch yes, i'll try. I'll do it if my skills are enough.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Nov 17, 2020
@thatmattlove thatmattlove self-assigned this May 1, 2021
@proudbro
Copy link

proudbro commented May 7, 2021

When it will be implemented? Really looking forward for it

@thatmattlove
Copy link
Contributor

@hoalex, @proudbro, @jeremystretch:

This is now implemented in the feature branch, at least as originally phrased. However, I haven't closed this yet as I wanted to get some further input. In feature, the new behavior is that the state of the "Show Images"/"Hide Images" button is persisted locally. This means once you toggle the button so that the images are hidden (which would display "Show Images" in the button), this is remembered in the browser for all rack views until the browser's localStorage is cleared.

However, we could take this a step further and make this configurable via the user profile in addition to the current behavior. This would guarantee that the setting is always persisted for the user, regardless of browser. I don't think it would be a ton of work to implement this, but I didn't want to go forward with it if all the interested parties were happy with the new behavior as-is.

@jeremystretch
Copy link
Member

I think it's fine to keep this in local storage for now. We need to spend some time thinking about how best to scale the user preferences framework before we add any more to it.

@thatmattlove
Copy link
Contributor

Agreed. I do have some thoughts there, and I think it will become more relevant as we move to an SPA model. For the time being, I think we can consider this issue closed as part of 3.0.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants