-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hide Authentication method "Microsoft Active Directory" #12
Open
theHacker
wants to merge
1
commit into
ngxson:master
Choose a base branch
from
theHacker:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this 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. However, I'm a bit doubt that this is an auto-generated class name, so I'm not sure if it will changed soon in one of the next versions.
I'm wondering if we can find a better selector here. Maybe based on
nth-child
, or ideally just a simple name like all other selectors?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a problem. But I must admit I do not know Portainer's HTML+CSS so well. I installed the software a couple of times and used it (before the whole BE stuff).
I would not recommend
nth-child
or something positional, because this can break easily. Also I noticed after creating the PR, that my rule not only eliminates the one box I show in the screenshot, but also a couple more further at the bottom, depending what authentication method you select.Do you think the
BoxSelector-BoxSelectorItem
is auto-generated because of uppercase letters? Does look like a legitimate name (ok a stupid name because of mixing snake and camel cases 🙈 ), but not special/auto-generated/about to change soon.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since portainer is open source, you can have a look at the source code to see where the class name comes from:
https://github.com/portainer/portainer/blob/6a51b6b41e9ecd79293a5ed8553f54d2c2286058/app/react/components/BoxSelector/BoxSelectorItem.module.css#L42-L49
https://github.com/portainer/portainer/blob/6a51b6b41e9ecd79293a5ed8553f54d2c2286058/app/react/components/BoxSelector/BoxSelectorItem.tsx#L46-L50
The class name is indeed transformed (rather than generated), so I assume that it won't change in near future.
If we want a bit more future-proof, I'd suggest matching all classes
[class*="BoxSelectorItem-module__business"]
, what do you think?