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

PLT-7853 Added thumbnail for SVG attachments #176

Merged
merged 2 commits into from
Oct 27, 2017
Merged

PLT-7853 Added thumbnail for SVG attachments #176

merged 2 commits into from
Oct 27, 2017

Conversation

hmhealey
Copy link
Member

It just uses the raw SVG file since that's probably smaller than loading a rasterized thumbnail image

Ticket Link

https://mattermost.atlassian.net/browse/PLT-7853

Checklist

  • Has UI changes

screen shot 2017-10-20 at 5 09 10 pm

@hmhealey hmhealey added the 2: Dev Review Requires review by a core commiter label Oct 20, 2017
@hmhealey hmhealey added this to the v4.4.0 milestone Oct 20, 2017
@@ -49,6 +49,8 @@ export default class FileAttachment extends React.Component {
const thumbnailUrl = getFileThumbnailUrl(fileInfo.id);

Utils.loadImage(thumbnailUrl, this.handleImageLoaded);
} else if (fileInfo.extesnion === 'svg') {
Copy link
Member

@saturninoabril saturninoabril Oct 21, 2017

Choose a reason for hiding this comment

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

maybe a type on extesnion

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to fix the typo 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. That also meant the loading logic was broken since it should've been showing the loading indicator forever because of that typo

@ccbrown
Copy link
Contributor

ccbrown commented Oct 21, 2017

I swear I made a commit that did exactly this a while ago...

Edit: I guess that was just for "previews" (mattermost/mattermost#7348). These should probably be made to share code.

@hmhealey
Copy link
Member Author

@ccbrown I've meant to combine the logic of those two since I wrote the current version of the file attachments. The FilePreview is the one used for files uploaded below the create post box, but it's heavily coupled to that so it would require a fair bit of work to share it between the two.

@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Oct 25, 2017
@hmhealey
Copy link
Member Author

I'll merge this PR shortly, but I'm using it to test some changes to Mattermod quickly

@hmhealey hmhealey added Setup Old Test Server Triggers the creation of a test server 4: Reviews Complete All reviewers have approved the pull request and removed Setup Old Test Server Triggers the creation of a test server 4: Reviews Complete All reviewers have approved the pull request labels Oct 25, 2017
@mattermost mattermost deleted a comment from mattermod Oct 25, 2017
@mattermost mattermost deleted a comment from mattermod Oct 25, 2017
@mattermost mattermost deleted a comment from mattermod Oct 25, 2017
@hmhealey hmhealey merged commit a84dafd into master Oct 27, 2017
@hmhealey hmhealey deleted the plt7853 branch October 27, 2017 01:17
@hmhealey hmhealey removed the 4: Reviews Complete All reviewers have approved the pull request label Oct 27, 2017
@jasonblais jasonblais added Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation labels Nov 2, 2017
sudheerDev pushed a commit to sudheerDev/mattermost-webapp that referenced this pull request Nov 3, 2017
* PLT-7853 Added thumbnail for SVG attachments

* Fixed loading of SVG attachment thumbnail

Moved create_post.jsx to folder and added redux-connect.
ry-wang pushed a commit to ry-wang/mattermost-webapp that referenced this pull request Nov 4, 2017
* PLT-7853 Added thumbnail for SVG attachments

* Fixed loading of SVG attachment thumbnail
@lindalumitchell lindalumitchell added the Tests/Done Release tests have been written label Nov 7, 2017
hmhealey pushed a commit that referenced this pull request Aug 28, 2020
…ors (#176)

* Complete direct channels info in selectors

* better error handling for joinChannel and createDirectChannel

* error handling for deleteChannel

* Fix unit tests
hmhealey pushed a commit that referenced this pull request Mar 17, 2021
…ors (#176)

* Complete direct channels info in selectors

* better error handling for joinChannel and createDirectChannel

* error handling for deleteChannel

* Fix unit tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
Development

Successfully merging this pull request may close these issues.

6 participants