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

[WIP] EnvFrom Styling #216

Closed
wants to merge 1 commit into from

Conversation

cdcabrera
Copy link
Contributor

Styling updates for EnvFrom component.

  • Minor select list highlighting update. Related to active and disabled classes being applied to the first UI-Select option under the scenario of it being auto selected.
  • [WIP] Modal styling classes

Styling updates for EnvFrom component
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 5, 2017
@@ -18,7 +18,8 @@
> span {
background-color: @dropdown-link-active-bg !important;
border-color: @dropdown-link-active-border-color !important;
color: @dropdown-link-active-color;
color: @dropdown-link-active-color !important;
cursor: default !important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be want this to be pointer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the funky part. This scenario plays out as that item being disabled... we could do a few things...

  • leave it as the disabled cursor,
  • change it to the pointer to make it similar to the select lists in general,
  • or leave it as something neutral with default...

Copy link
Member

@sg00dwin sg00dwin Oct 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This screenshot shows the conundrum and the reason why, to me, it made more sense to assign it the default cursor.

By default ui-select makes the first selection .active. So if the first option has already been selected in another select, then having the cursor be pointer would imply it’s still clickable when it’s not.

screen shot 2017-10-05 at 4 40 34 pm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it should be clickable. The bug to me is that the current value is marked invalid. It is a valid selection.

Note that in other selects we use a pointer cursor for the active item.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other words, I don't think this is a style bug. The bug is we're making an item disabled when it's not.

Copy link
Contributor Author

@cdcabrera cdcabrera Oct 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agree it's not entirely a style bug when an item can be disabled and active at the same time... but at the same time UI Select maybe should have already taken that into account with its styling... or lack of.

Of the opinion that having both classes applied really shouldn't be able to happen without some form of CSS support if UI Select is just going to default to selecting the first item automatically.

Working on a couple of alternates:

  • we just ignore disabling all together (maybe remove duplicates on save)
  • @sg00dwin mentioned an alternative that has its own issues (possibly around drag and sort on the Environment From component) where we could simply remove/hide the items already selected... it avoids the issue entirely.
  • we try to autoselect the first non-disabled item

@cdcabrera
Copy link
Contributor Author

cdcabrera commented Oct 9, 2017

Closing this PR since it's related to a bypass as opposed to a real fix. May re-open as updates for Environment From become necessary.

Related to the disabled styling...

Origin Web Console PR EnvFrom Config Map and Secret Link 2201 contains the approach of relaxing the disabled aspect and placing an error/warning message instead

@cdcabrera cdcabrera closed this Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants