Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Collapse uploaded image #1060

Merged
merged 3 commits into from
May 9, 2018
Merged

Conversation

lisakycho
Copy link
Contributor

Summary

Added a feature to allow the image uploaded to be collapsed using an icon and using /collapse command

Ticket Link

N/A

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Ran make check-style to check for style errors (required for all pull requests)
  • Has UI changes

Screenshots

Left: Image is collapsed
screenshot 2018-04-05 23 34 42

@jwilander jwilander self-assigned this Apr 6, 2018
@jwilander jwilander added the Work in Progress Not yet ready for review label Apr 6, 2018
@jwilander
Copy link
Member

@lfbrock asked @lisakycho to work on this without a ticket

@jwilander jwilander added 1: PM Review Requires review by a product manager and removed Work in Progress Not yet ready for review labels Apr 6, 2018
@jwilander jwilander removed their assignment Apr 6, 2018
@lfbrock
Copy link
Contributor

lfbrock commented Apr 6, 2018

Thanks @jwilander, @esethna we had some customers requesting this one after the image thumbnail changes were shipped, would you be able to help out with reviewing the UX for it when you have a chance?

@lisakycho lisakycho force-pushed the collapseUploadedImage branch 2 times, most recently from 4275718 to 3e5ba6c Compare April 6, 2018 23:53
@esethna esethna added the Setup Old Test Server Triggers the creation of a test server label Apr 11, 2018
Copy link
Contributor

@esethna esethna left a comment

Choose a reason for hiding this comment

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

Thanks Lisa! A few comments:

  1. I think all image attachments should be expanded by default after they post (currently they are following the account setting for "Default appearance of image link previews"). Then after post they can follow the /collapse /expand.
  2. Looks like the button to collapse/expand isn't working in some cases:
    image

@esethna esethna added the Awaiting Submitter Action Blocked on the author label Apr 11, 2018
@lisakycho
Copy link
Contributor Author

@esethna Do you mind letting me know the cases that didn't work for you? Thanks!

@esethna
Copy link
Contributor

esethna commented Apr 12, 2018

@lisakycho having trouble identifying the exact repro, but I can repro occasionally if:

  1. Set Account setting Default appearance of image link previews to "Expanded"
  2. Create a new private channel
  3. Paste a single image
  4. Try to click the collapse icon - nothing happens

@esethna
Copy link
Contributor

esethna commented Apr 18, 2018

@lisakycho let me know if you are still having trouble reproing and we can try to narrow it down further

@lisakycho
Copy link
Contributor Author

@esethna sorry, i was super busy finishing final exams, i will work on this soon!

@lisakycho
Copy link
Contributor Author

@esethna, I'm having some problem reproing it. Do you mind helping me narrow it down? Also what did you want to do with the ticket if we can't repro it?

@esethna esethna removed Awaiting Submitter Action Blocked on the author Setup Old Test Server Triggers the creation of a test server labels Apr 20, 2018
@mattermost mattermost deleted a comment from mattermod Apr 20, 2018
@mattermost mattermost deleted a comment from mattermod Apr 20, 2018
@mattermost mattermost deleted a comment from mattermod Apr 20, 2018
@esethna esethna added the Setup Old Test Server Triggers the creation of a test server label Apr 20, 2018
@esethna
Copy link
Contributor

esethna commented Apr 20, 2018

That's strange, I can repro quite consistently by pasting an image from the clipboard, posting and trying to click the arrows.

@lindalumitchell if you would have a chance to try this PR and let us know if you can identify any issues with the collapse/expand arrows using the mouse?

image

@lisakycho
Copy link
Contributor Author

Hey @esethna, I pushed a new version of the code where all uploaded images are expanded by default. I’ll keep testing to see if I can find cases where the collapse button does not work.

@mattermost mattermost deleted a comment from mattermod May 4, 2018
@mattermost mattermost deleted a comment from mattermod May 4, 2018
@mattermod
Copy link
Contributor

Setup Test Server label detected. Spinmint test server created if build succeeds (checks pass and no conflicts with base branch).

@esethna esethna added the Setup Old Test Server Triggers the creation of a test server label May 4, 2018
@mattermod
Copy link
Contributor

Spinmint test server created at: http:https://i-03863fdacc82e0252.spinmint.com

Test Admin Account: Username: sysadmin | Password: sysadmin

Test User Account: Username: user-1 | Password: user-1

Instance ID: i-03863fdacc82e0252

@esethna esethna added 2: Dev Review Requires review by a core commiter and removed 1: PM Review Requires review by a product manager Setup Old Test Server Triggers the creation of a test server labels May 4, 2018
@mattermod
Copy link
Contributor

Spinmint test server destroyed

Copy link
Contributor

@esethna esethna left a comment

Choose a reason for hiding this comment

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

@lisakycho nice work solving that issue! Looks great. Moving to dev review.

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

Thanks @lisakycho! Just a few comments.

};

static defaultProps = {
fileInfo: {},
previewEnabled: false,
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary?

<a
key='toggle'
className='post__embed-visibility'
data-expanded={this.props.isEmbedVisible}
Copy link
Member

Choose a reason for hiding this comment

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

Is data-expanded needed?

settings.

Clean code for collapsing uploaded images.

Collapse icon is on the same line as image name.

Image uploaded can be collapsed using icon.
@lisakycho
Copy link
Contributor Author

Hey, @saturninoabril! Made the changes you requested! Please let me know if there is anything else!

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

Cool, thanks!

@jwilander jwilander added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels May 9, 2018
@jwilander jwilander merged commit ff15a76 into mattermost:master May 9, 2018
@amyblais amyblais added Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation labels May 19, 2018
@lindalumitchell lindalumitchell added the Tests/Done Release tests have been written label Jun 13, 2018
hmhealey pushed a commit that referenced this pull request Aug 28, 2020
* add roles constants

* update export roles

* create roles type

* update roles type
hmhealey pushed a commit that referenced this pull request Mar 17, 2021
* add roles constants

* update export roles

* create roles type

* update roles type
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
8 participants