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

Feature/3949/allow editing before upload #3988

Merged
merged 12 commits into from
Aug 17, 2020

Conversation

marcoambrosini
Copy link
Member

@marcoambrosini marcoambrosini commented Aug 3, 2020

Follow-up:

  • Prevent duplicate uploads
  • Upload indicator should be overlaid on image, and just vanish when it’s uploaded
  • Re-drop files on modal

@marcoambrosini marcoambrosini self-assigned this Aug 3, 2020
@marcoambrosini marcoambrosini force-pushed the feature/3949/allow-editing-before-upload branch from 8291ec3 to 652bfe0 Compare August 5, 2020 13:49
@marcoambrosini marcoambrosini marked this pull request as ready for review August 5, 2020 13:51
@marcoambrosini marcoambrosini force-pushed the feature/3949/allow-editing-before-upload branch 3 times, most recently from ca1e3a0 to 4af73ed Compare August 5, 2020 15:40
@nickvergessen nickvergessen added this to the 💚 Next Major (20) milestone Aug 5, 2020
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
@danxuliu danxuliu force-pushed the feature/3949/allow-editing-before-upload branch from b017977 to 6c88f42 Compare August 12, 2020 02:11
Comment on lines 216 to 245
/* Show a hover colour around the preview when navigating with the
* keyboard through the file links (or hovering them with the mouse). */
&:hover,
&:focus,
&:active {
.preview {
background-color: var(--color-background-hover);
border-radius: 16px;

/* Trick to keep the same position while adding a padding to show
* the background. */
box-sizing: content-box !important;
padding: 10px;
margin: -10px;
}
&:hover,
&:focus {
background-color: var(--color-background-hover);
/* Trick to keep the same position while adding a padding to show
* the background. */
box-sizing: content-box !important;
Copy link
Member

Choose a reason for hiding this comment

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

While this looks good in the upload editor in my opinion the look in the messages list has regressed. Therefore I would suggest to have both the previous style and the new one, and use one or the other depending on whether the upload-editor class is set or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you think has regressed in particular? Before there was an unneeded hover feedback on the preview itself that partially covered the sender's username.

Copy link
Member

Choose a reason for hiding this comment

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

there was an unneeded hover feedback on the preview itself

I think that the hover feedback should be there, as it shows the user that she can interact with the file. The problem is that the whole message is "highlighted" on hover when showing the reply button, and that hides the specific feedback for the file. Anyway, I would be fine with removing the hover feedback on the file due to that overlap (but I would prefer to find a better solution nevertheless).

that partially covered the sender's username

I know, it has been haunting me since I added it :-P

However, even if it covers the sender's username I prefer that small, focused frame on the file:
Message-File-Focus-Before

Rather than highlighting the whole message body (even if it actually matches the real clickable area):
Message-File-Focus-After

For me the previous version feels and looks much better when navigating with the keyboard. Also the change is not directly related to editing the upload, so in any case I would address it in a separate pull request too.

Copy link
Member 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 current behavior (before this pr):
Peek 2020-08-13 09-43

So you get the big hover feedback of the message but no clickability unless you hover the preview, and since the hover color is the same, you get the hover feedback of the preview only through unwanted stuff:

  • overflow from the message on the left;
  • invading the name on top;

The keyboard navigation is a bug with how messages hover feedback is implemented. For a reference of how it should really look refer to the mouse navigation feedback. Plus, I think that a bigger click area is generally better, since that space is unused anyway... I implemented the change in this pr because I'm adapting the filepreview component.

Peek 2020-08-13 09-31

src/components/UploadEditor.vue Outdated Show resolved Hide resolved
src/components/UploadEditor.vue Outdated Show resolved Hide resolved
Copy link
Member Author

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

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

Form the design call:

  • Aspect ratio of images in uploader squished
  • "+" Button needs margin like the previews
  • Dismiss → Cancel, and Cancel button to left
  • Make sure "Remove" button is tabbable and also has an aria-label (including the filename)
  • Add aria-label to "+" Button (Added a part about the remove button accesibility, make sure they are labeled also incl the filename, not all just "Remove" :)

@marcoambrosini marcoambrosini force-pushed the feature/3949/allow-editing-before-upload branch from 37fcaf0 to 7bdc55b Compare August 13, 2020 14:56
@marcoambrosini marcoambrosini force-pushed the feature/3949/allow-editing-before-upload branch from 7bdc55b to e6e2c43 Compare August 13, 2020 15:20
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
@marcoambrosini marcoambrosini force-pushed the feature/3949/allow-editing-before-upload branch from e6e2c43 to 6653eb6 Compare August 13, 2020 16:01
@nickvergessen
Copy link
Member

Follow up:

  • Ctrl+V with an copied image works on the first try, but on follow up pastes, it just replaces the previous image.
  • When the dialog is open, drag+drop does not work anymore. Would be nice to be able to still drag+drop on top of the modal to add more images to the process

rel="noopener noreferrer"
@click="showPreview">
<img v-if="!isLoading && !failed"
<file-preview v-bind="filePreview"
Copy link
Member

Choose a reason for hiding this comment

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

This file really bothers me. The shared part is actually so little, that it should just be 2 maintainable subcomponents instead.

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.

3 participants