-
Notifications
You must be signed in to change notification settings - Fork 26
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
POST logout #2043
POST logout #2043
Conversation
- Assert presence/absence of logout button, instead of link - Clicks on button - This is a 1st draft. It functions, but needs improvement
- Changes logout links to button in the view files - Includes appropriate changes to css
@mo-nathan & @nimmolo : |
} | ||
} | ||
|
||
.btn-glyphicon-only { |
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.
- Is there a better name for this style?
- Can its substance be improved?
- Does it belong in this file or in app/assets/stylesheets/mo/_top_nav.scss?
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.
@JoeCohen - I changed some things to make it resemble the current links.
The class will be also useful in Bootstrap 4-5, it's btn-link
.
It's for when the element must be a button, but you want it to resemble a link.
I agree that the top nav logout might be better as a button, and i'm looking to rethink all that stuff soon (before upgrading to BS4) but it might make that simpler to keep it as is for now.
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 think .btn-glyphicon-only
is not necessary with these changes)
tag.span(class: "pull-left") do | ||
button_to(:app_logout.t, | ||
account_logout_path, | ||
{ class: "btn", id: "nav_user_logout_link" }) | ||
end |
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.
Should this be centered or otherwise moved?
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.
This one currently flushes right, but it doesn't really work with long usernames > "chaelthomas".
I propose knocking it down to the next line... committed that change, let me know if that works.
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.
(Trying to avoid the situation where it currently smushes the username on top of the word "logout")
.dropdown-menu li button.btn-link { | ||
padding: 3px 20px; | ||
} | ||
|
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.
This just duplicates the Bootstrap inherited styling of .dropdown-menu li a
, copied from there
<%= link_to(:welcome_logout_link.t, account_logout_path) %> | ||
<%= button_to(:app_logout.t, | ||
account_logout_path, | ||
{ class: "btn", id: "nav_user_logout_link" }) %> |
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.
iirc with BS everywhere you use btn
you have to also use a coloration, like btn-default
.
logout
action.This prevents eager loading and may solve the issue of some users being spontaneously logged out.
It requires rendering
Logout
as a button (rather than a link).See #2042
TODO
Suggest Manual Test