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

Show password input field in a popover menu. #647

Merged
merged 6 commits into from
Mar 27, 2018
Merged

Conversation

Ivansss
Copy link
Member

@Ivansss Ivansss commented Feb 12, 2018

Following #607
Also fix #563

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
@danxuliu
Copy link
Member

Not ready for review yet.

@jancborchardt this still needs some design love as mentioned by @Ivansss in the previous pull request.

@skjnldsv skjnldsv self-assigned this Mar 22, 2018
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv
Copy link
Member

The requirements for a proper popovermenu are documented here: https://docs.nextcloud.com/server/14/developer_manual/design/popovermenu.html :)

@skjnldsv
Copy link
Member

@nickvergessen @danxuliu the small confirm button is fixed in master: nextcloud/server#8777

}

.newCommentRow .editable-text-label .label {
margin-left: 5px;
Copy link
Member

Choose a reason for hiding this comment

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

Can you bring this back, looks much better then, because name and chat input are in line

},

renderWhenInactive: function() {
if (this.ui.passwordInput.length === 0 || !this.passwordInputIsShown || this.ui.passwordInput.val() === '') {
Copy link
Member

Choose a reason for hiding this comment

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

This is required for firefox, when you have one password saved in your browser.
Otherwise the call info will never update, because the password is always non-empty

Copy link
Member

Choose a reason for hiding this comment

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

With the auto-fill?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, firefox fills it, although autocomplete off/new-password/...

You can test it:

  1. Create a public room
  2. Click on join
  3. Approve media permissions

Button still says "Join" instead of "Leave"

Copy link
Member

Choose a reason for hiding this comment

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

Damn firefox!!

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Fixed!

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@nickvergessen
Copy link
Member

Btw is hte > needed?
I don't think it adds valuable information:

bildschirmfoto von 2018-03-26 12-31-32

@skjnldsv
Copy link
Member

skjnldsv commented Mar 26, 2018

@nickvergessen an icon is required in a popovermenu. I found the most basic one, sorry ! :)
Please suggest another! :p

@nickvergessen
Copy link
Member

Dreaming: "an open lock which changes to a closed one, when you start typing a password" xP

Okay then be it a triangle

@@ -28,6 +28,8 @@
OCA.SpreedMe = OCA.SpreedMe || {};
OCA.SpreedMe.Views = OCA.SpreedMe.Views || {};

var uiChannel = Backbone.Radio.channel('ui');
Copy link
Member

Choose a reason for hiding this comment

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

ESlint fails:

/drone/src/github.com/nextcloud/spreed/js/views/callinfoview.js
31:6 error 'uiChannel' is defined but never used no-unused-vars

Copy link
Member

Choose a reason for hiding this comment

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

Must be a rebase error, I don't recall adding this line! Let me remove it!

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@@ -186,7 +186,7 @@
},

renderWhenInactive: function() {
if (this.ui.passwordInput.length === 0 || (OC._currentMenu && OC._currentMenu.hasClass('password-menu')) || this.ui.passwordInput.val() === '') {
if (!OC._currentMenu || !OC._currentMenu.hasClass('password-menu') || this.ui.passwordInput.length === 0 || this.ui.passwordInput.val() === '') {
Copy link
Member

Choose a reason for hiding this comment

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

Nope, OC._currentMenu can be set to another menu like the apps menu or the setting one :)

Copy link
Member

Choose a reason for hiding this comment

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

Exactly, but it is okay to reload the side bar when you have another menu open, just not the password field, because it would overwrite your changes.
Note this if is the evil thing, when we don't go inside, we will just retry later.

Copy link
Member

Choose a reason for hiding this comment

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

Performance-side, why reload it on another menu click? Seems unnecessary :)

Copy link
Member

Choose a reason for hiding this comment

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

It's not on click, it's on "model changed" and that may be in the background when the room list is updated (happens on pull after a notification that there was a change...).
We jsut want to prevent rerendering while the user is typing a password.

Copy link
Member

Choose a reason for hiding this comment

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

Ah okay! :)
Then it's 👍 for me!

@nickvergessen nickvergessen merged commit 44431df into master Mar 27, 2018
@nickvergessen nickvergessen deleted the password-popover branch March 27, 2018 13:08
@nickvergessen
Copy link
Member

Is this already backported? at least it doesn't work cleanly for me, although everything which was merged to master before this one is already backported....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Guest name input field jumps on hover
4 participants