mattermost-mobile/app/constants/attachment.js
Amit Uttam 66a6e5c932 [MM-10813] Design update for Post attachments (#3511)
* [MM-10813] Design update for Post attachments

Fixes https://github.com/mattermost/mattermost-server/issues/12841

* Updated visual treatment for Post attachments (images, documents, videos)
* Grouped image attachments, expanding to fit Post width dimension
* Itemized listing of non-image attachments
* Special handling of "small" image attachments (<48 point width/height)

* Set attachment post width to max width of portrait orientation

Accounts for post display offset and extra spacing used for rendering post replies.

* Use available Post real estate: flex: 1 instead of width 100%

* Image spacing responsibility: AttachmentList -> AttachmentImage

* Fit download progress circle correctly over new attachment icons

* Layers progress circle over the icon, rather than under.
* Uses offset constant as far as possible, rather than fixed point spaces.

* Refactor props and 'more' counting for image file attachment(s)

* Implement conditional gutter between image attachments

Flex's `justifyContent: space-between` won't work in this case because of the use of `absoluteFill` and `paddingBottom: 100%` in the box placeholder for an image attachment to auto-fill *all* available flex space.

* Additional snapshots for Post file attachment scenarios

* Use new 'text' icon for text files (.txt, .rtf)

Depends on https://github.com/mattermost/mattermost-redux/pull/979

Even without the change to mattermost-redux above, text files will default to pre-existing "code" icon.

* Set file attachment icon background to theme

Default to transparent. Override if explicitly specified.

* Treat animated GIFs as images when auto-adjusting attachment width

* Fix images layout, progressive image margins, and gallery for images and videos

* fix on iPad (splitview, permanent sidebar) card types and image sizes

* Add all files back to the gallery
2019-11-15 22:41:09 -05:00

6 lines
245 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
export const MAX_ATTACHMENT_FOOTER_LENGTH = 300;
export const ATTACHMENT_ICON_HEIGHT = 48;
export const ATTACHMENT_ICON_WIDTH = 36;