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

Fixes #21447 - The login page should be based on patternfly #4947

Merged
merged 1 commit into from Oct 30, 2017

Conversation

sharvit
Copy link
Contributor

@sharvit sharvit commented Oct 25, 2017

The login.scss used to be a compiled version of the patternfly login.scss
https://github.com/patternfly/patternfly-sass/blob/master/assets/stylesheets/patternfly/_login.scss

This change is breaking the foreman_theme_satellite project so we will need to update the relevant files there.

Before the changes:
screenshot-2017-10-25 login 7
screenshot-2017-10-25 login 6
screenshot-2017-10-25 login 5
screenshot-2017-10-25 login 4

After the changes:
screenshot-2017-10-25 login 3
screenshot-2017-10-25 login 2
screenshot-2017-10-25 login 1
screenshot-2017-10-25 login

Notice that the alert styling changed to the way that patternfly designed them for the login page:
https://github.com/patternfly/patternfly-sass/blob/master/assets/stylesheets/patternfly/_login.scss#L52-L55

@theforeman-bot
Copy link
Member

Do not merge! This patch has not been tested yet.

Can an existing organization member please verify this patch?

1 similar comment
@theforeman-bot
Copy link
Member

Do not merge! This patch has not been tested yet.

Can an existing organization member please verify this patch?

@theforeman-bot
Copy link
Member

Issues: #21447

@amirfefer
Copy link
Member

amirfefer commented Oct 25, 2017

@sharvit
Could you please follow Patternfly login page recommendation?
alert messages look different a bit.

@sharvit
Copy link
Contributor Author

sharvit commented Oct 25, 2017

@amirfefer
I just opened an issue in patternfly:
patternfly/patternfly#804

Their implementation is different than their examples.

@ohadlevy
Copy link
Member

[ok to test]

@sharvit sharvit force-pushed the feature/patternfly-refactoring branch from 230da68 to 14f685a Compare October 26, 2017 06:49
@sharvit
Copy link
Contributor Author

sharvit commented Oct 26, 2017

Hi @Rohoover,
can you please share your point of view about this issue with patternfly?

Thanks.

.login-page #brand {
position: relative;
top: -52px;
.login-pf {

Choose a reason for hiding this comment

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

These styles aren't provided in the patternfly css? Or is this another occurrence of us having to manually copy over styling because of the out of date patternfly-sass project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

patternfly-sass is up to date in this case.
The styles here represent the differences between our design to patternfly design which is a bit different.
For example, patternfly using a background image, the brand positioning and size are different and some paddings inside the container are different.

@@ -1,4 +1,5 @@
<% content_for :title, _('Login') %>
<span id="badge"></span>

Choose a reason for hiding this comment

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

I don't see this id used in this PR, is this <span> necessary?

Copy link
Contributor Author

@sharvit sharvit Oct 26, 2017

Choose a reason for hiding this comment

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

@waldenraines
There is no use for span#badge as you mention unless you install the foreman_theme_satellite.
Then it should put the RedHat logo img inside the span#badge.

Removing the #badge cause this error because patternfly use it as a placeholder:
screenshot-2017-10-26 login

The old version used media queries in order to override this behavior and fix this issue.
I believe we should go with the patternfly implementation and keep it as a placeholder so we have less css code.

It means that I will need to update the foreman_theme_satellite project to inject the img inside the span#badge and not together with it before the #login like it does now:

@Rohoover
Copy link

@sharvit My old notes on this don't apply as it looks like things have changed.

@sharvit
Copy link
Contributor Author

sharvit commented Oct 29, 2017

Patternfly created a new pr to fix this issue:
patternfly/patternfly#811

I am going to update the login page to use the traditional alerts.

@sharvit
Copy link
Contributor Author

sharvit commented Oct 29, 2017

@waldenraines, @Rohoover, @ohadlevy
I took this opportunity to try shorter alerts, what do you think about it?

screenshot-2017-10-29 login 1
screenshot-2017-10-29 login

@sharvit sharvit force-pushed the feature/patternfly-refactoring branch from 14f685a to 9c03b94 Compare October 29, 2017 08:30
max-height: 17em;
overflow-y: auto;
.alert-danger {
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);

Choose a reason for hiding this comment

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

Unexpected unknown at-rule "@include" at-rule-no-unknown

.login-page .container .login {
padding-right: 40px;
.alert-warning {
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);

Choose a reason for hiding this comment

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

Unexpected unknown at-rule "@include" at-rule-no-unknown

padding-top: 0;
margin-top: 0;
.alert-info {
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);

Choose a reason for hiding this comment

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

Unexpected unknown at-rule "@include" at-rule-no-unknown

// https://github.com/patternfly/patternfly/issues/804
.login-pf .login-page .container {
.alert-success {
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);

Choose a reason for hiding this comment

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

Unexpected unknown at-rule "@include" at-rule-no-unknown

@sharvit sharvit force-pushed the feature/patternfly-refactoring branch from 9c03b94 to 421dfb8 Compare October 29, 2017 08:33
@Rohoover
Copy link

I would stick with patternfly and the full size alerts.

@waldenraines
Copy link

I took this opportunity to try shorter alerts, what do you think about it?

I honestly like the way the shorter alerts look but I think we should be consistent with patternfly recommendations and the rest of the application.

@sharvit
Copy link
Contributor Author

sharvit commented Oct 30, 2017

Sounds reasonable.

You can review and merge, no future commit will come.

@ohadlevy
Copy link
Member

@waldenraines - please re-review.

Copy link

@waldenraines waldenraines left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @sharvit!

@ohadlevy ohadlevy merged commit 1766969 into theforeman:develop Oct 30, 2017
@sharvit sharvit deleted the feature/patternfly-refactoring branch November 6, 2017 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants