Skip to content

Improved external share dialog - #9415

Merged
MorrisJobke merged 2 commits into
masterfrom
external-sharedialog
Jul 7, 2014
Merged

MorrisJobke merged 2 commits into
masterfrom
external-sharedialog

Conversation

@PVince81

@PVince81 PVince81 commented Jul 3, 2014

Copy link
Copy Markdown
Contributor

OC.dialogs now returns the promise to make it possible for the called to
do additional operations after the promise is resolved.

Changed title, label and buttons.
Removed icon.

Please review @owncloud/designers @icewind1991 @schiesbn

⚠️ protect your eyes, hacking involved!

Feel free to push if you want to change the wording.
The best way to test it is to comment out the line with location.href in external.js to force the dialog appearing every time on refresh. (convenient for testing)

Edit: removed wrong screenshot

@jancborchardt jancborchardt mentioned this pull request Jul 3, 2014
9 tasks done
@PVince81

PVince81 commented Jul 3, 2014

Copy link
Copy Markdown
Contributor Author

external-dialog

@jancborchardt if you really want the main button on the left you'll have to tweak the CSS of the dialogs to make it so for ALL dialogs.
It looks like those dialogs still have the old OC 5 styles...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe return the dialog from the promise so we dont have to do a global selector

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How to do that ? You seemed to be an expert with promises. Feel free to make the change.

@jancborchardt

Copy link
Copy Markdown
Contributor

It’s ok if the »No«/»Decline« button is floated left on all dialogs. In which file should I put that code though? …

@PVince81

PVince81 commented Jul 3, 2014

Copy link
Copy Markdown
Contributor Author

I have no idea... usually what I do is used the CSS inspector of Chrome, and that tells me which file to edit. There seems to be a jquery.ocdialog.css file. You could add some entries for the buttons.

@jancborchardt

Copy link
Copy Markdown
Contributor

@PVince81 pushed wording and styling fixes. I need help from you on 2 things:

  • instead of using quotation marks, we should bold both the name of the share and the user
  • we should remove the close button on the dialog – either you add, or you cancel. But closing is unclear

@ghost

ghost commented Jul 4, 2014

Copy link
Copy Markdown

@MorrisJobke

Copy link
Copy Markdown
Contributor

I can't test this due to #9416

@PVince81

PVince81 commented Jul 4, 2014

Copy link
Copy Markdown
Contributor Author

@jancborchardt hmm... it's not possible to use tags in the message, maybe you noticed already.
Which means we need to increase hackery: completely replace the message in that callback.
Can do, but extra ugly.

@jancborchardt

Copy link
Copy Markdown
Contributor

@PVince81 ok, your call on that, whether we should do it. It would increase the user experience a lot, but maybe too much hackery?
Is removing the close button possible though?

@icewind1991

Copy link
Copy Markdown
Contributor

When pressing the cancel button a second dialog appears for me.


Pressing the close button on the dialog doesn't seem to trigger this

@PVince81

PVince81 commented Jul 4, 2014

Copy link
Copy Markdown
Contributor Author

@jancborchardt I tried hacking the dialog and it's getting out of hand.
The text is wrapping like crazy. I believe that the regular dialog seems to insert   everywhere.
Let's leave it for now...

I'll remove the close button and look at the buttons issue that @icewind1991 mentionned.

@PVince81

PVince81 commented Jul 4, 2014

Copy link
Copy Markdown
Contributor Author

@icewind1991 @jancborchardt arghhhh, the dialog code is even more messy than I thought: when you click on a button, it will first delete the buttons and re-create them: https://github.com/owncloud/core/blob/master/core/js/jquery.ocdialog.js#L129

It looks like those dialogs have an auto-immune system that doesn't let people mess with them that easily...

@PVince81

PVince81 commented Jul 4, 2014

Copy link
Copy Markdown
Contributor Author

Correction: it seems to try and set the "primary" class on the clicked button.
So it means it makes the clicked button primary even if it wasn't ?!

@jancborchardt it means that your CSS hack for buttons alignment cannot work

@jancborchardt

Copy link
Copy Markdown
Contributor

@PVince81 well, if the clicked button gets assigned the »primary« class, that’s the real problem. The cancel button should never be blue.

@vgezer

vgezer commented Jul 6, 2014

Copy link
Copy Markdown
Contributor

So, when this is merged, we will not have any language 100% translated with ownCloud 7 as there are new strings :). @DeepDiver1975 what about doing one more pull just before 1 day of the release? I can pull manually and do a PR for it.

@karlitschek

Copy link
Copy Markdown
Contributor

I think we still have some time before the release to fix the strings. :-)

@vgezer

vgezer commented Jul 6, 2014

Copy link
Copy Markdown
Contributor

@karlitschek Yes, but currently all pulled strings are for ownCloud 8, but we will release the stable7 branch right? :)

Comment thread apps/files_sharing/js/external.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

t('files_sharing', 'Add remote share')
t('files_sharing', 'Cancel')

@karlitschek

Copy link
Copy Markdown
Contributor

true. @DeepDiver1975 Any advice?

Vincent Petry added 2 commits July 7, 2014 15:56
Default dialog button is now on the right, other one on the left.
Changed title, label and buttons.
Removed icon.
@PVince81

PVince81 commented Jul 7, 2014

Copy link
Copy Markdown
Contributor Author

Rebased and squashed:

  • the first commit reverses the Yes/No buttons in general
  • the second commit is for the external share dialog, renaming the buttons

You can test this by entering this in the browser console:
Alert dialog:

OC.dialogs.alert('Alert text', 'Title');

External share dialog:

OCA.Sharing.showAddExternalDialog('example.com', 'abctoken', 'Owner Name', 'Share name', true)

Set "true" to "false" to remove the password field.

Note, I cannot format the text or replace it with formatted text without messing everything up. The dialog implementation is just too resistant...

@icewind1991

Copy link
Copy Markdown
Contributor

👍 tested

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: No issues found

@MorrisJobke

Copy link
Copy Markdown
Contributor

Looks good. I just can test the dialog and redirects, but not the actual mounting. 👍

@ghost

ghost commented Jul 7, 2014

Copy link
Copy Markdown

MorrisJobke added a commit that referenced this pull request Jul 7, 2014
@MorrisJobke
MorrisJobke merged commit 54a8dce into master Jul 7, 2014
@MorrisJobke
MorrisJobke deleted the external-sharedialog branch July 7, 2014 17:51
@MorrisJobke

Copy link
Copy Markdown
Contributor

Stable7 db72e90 60e3195

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants