Will Hunt
fe788486b7
Drop (IRC) suffix hacks
2018-10-03 19:34:06 +01:00
Luke Barnard
5b8e453484
Merge pull request #1991 from matrix-org/t3chguy/delint_MImageBody
...
delint MImageBody, fixes anonymous class and hyphenated style keys which made react cry
2018-06-22 10:38:56 +01:00
David Baker
e67dae704a
Take replies out of labs!
2018-06-20 09:57:11 +01:00
Michael Telatynski
fffb8379d8
delint MImageBody, fixes anonymous class and hyphenated style keys which made react cry
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-19 08:37:11 +01:00
David Baker
499bb5cfb4
Merge pull request #1972 from matrix-org/t3chguy/media_fixes
...
fix e2ee file/media stuff
2018-06-18 13:56:00 +01:00
Michael Telatynski
3ebec92ac5
replace hardcoded matrix.to
with reference to const in matrix-to
...
for easier changing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-16 08:27:47 +01:00
David Baker
88a807d89b
Merge pull request #1965 from matrix-org/t3chguy/show_redacted_sticker
...
check type before msgtype in the case of `m.sticker` with msgtype
2018-06-15 10:56:33 +01:00
David Baker
6904c2bafe
Merge pull request #1948 from matrix-org/export_Group
...
Share Dialog
2018-06-15 10:52:27 +01:00
Michael Telatynski
826df5765c
add rel noopener to cross origin loader (currently rel="undefined")
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-15 10:27:21 +01:00
Luke Barnard
2eb23ed234
Add loadedImageDimensions to initial state
2018-06-14 15:53:49 +01:00
Luke Barnard
2d14d51ecb
Handle images without width/height info correctly
...
Prior to #1912 , height fix up of image events without an `info` in their
content would fail, setting `style.height = null + "px"`.
Now that all thumbnail sizing is done through one path, we can fix the
same problem for all cases (images, stickers, e2e/non-e2e) by handling
images without `info` correctly.
At the bare minimum, we use a null-guard that will make sure an image
without an `info` does not appear in the timeline (as a spinner or
otherwise until loaded). When loaded, we size it like any other image
by using the natural dimensions of the loaded image in place of `info`.
Note that we do not apply the same logic to images that *do* specify an
`info` with `w` and `h` keys. If the aspect ratio of the image does not
match that of the event, we use the one in `info` even when the image
has loaded.
2018-06-14 15:44:55 +01:00
Luke Barnard
c8d233c0a6
If unspecified, don't crash if missing thumbnail info
...
applies to stickers/images.
We might want to consider to do that is better than assuming a aspect
ratio of 600 x 800 (4:3).
2018-06-14 14:19:30 +01:00
Michael Telatynski
9a225840ce
check type before msgtype in the case of m.sticker
with msgtype (undef)
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-14 12:00:53 +01:00
Luke Barnard
7029e9ac74
Merge pull request #1912 from matrix-org/luke/kill-mimage-fixupheight
...
Implement slightly magical CSS soln. to thumbnail sizing
2018-06-14 11:17:15 +01:00
Michael Telatynski
20caea47f8
make more generic
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-13 09:32:21 +01:00
Michael Telatynski
846c14062a
show redacted stickers like other redacted messages
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-13 09:28:35 +01:00
Michael Telatynski
64bcf6fd7e
allow ContextualMenu to run without background, for tooltips & fix copy
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-12 11:22:01 +01:00
Luke Barnard
2120858e5f
Merge branch 'develop' into luke/kill-mimage-fixupheight
2018-06-11 14:24:40 +01:00
Travis Ralston
033c41a2a8
Align pinned message contents and reduce image size
...
Fixes https://github.com/vector-im/riot-web/issues/5421
Signed-off-by: Travis Ralston <travpc@gmail.com>
2018-05-26 18:40:48 -06:00
Luke Barnard
538979a4ee
Fix MVideoBody spinner
2018-05-22 17:13:45 +01:00
Luke Barnard
c249bee9b5
Grammar
2018-05-22 16:09:54 +01:00
Luke Barnard
fb5dd4a410
Remove spurious fixupHeight
2018-05-22 10:46:10 +01:00
Luke Barnard
e4f8c09c32
Only include placeholder in DOM when necessary
2018-05-22 10:43:16 +01:00
Luke Barnard
e9ae3de00f
Merge branch 'develop' into luke/kill-mimage-fixupheight
2018-05-21 17:15:54 +01:00
Luke Barnard
836dc8b0ef
Factor out all shared logic between MStickerBody and MImageBody
...
The benefits of this:
- One code path for determining spinner/placeholder and it's position
for loading images/stickers. This includes spinner used in e2e
decryption of images.
- Very small definition for MStickerBody, only overriding the minimal
differences is has from MImageBody.
The disadvantages:
- Slightly more complicated MImageBody, but hopefully not less
readable.
2018-05-21 16:59:13 +01:00
Luke Barnard
015093b371
Move inline style to stylesheet
2018-05-18 11:34:41 +01:00
Luke Barnard
7e7e2a7473
Add more comments to explain thumbnail sizing
2018-05-18 10:27:22 +01:00
Luke Barnard
d11442de04
Adjust comment
2018-05-18 10:15:59 +01:00
Luke Barnard
b41b9aa4fa
Remove fixupHeight call from MStickerBody
2018-05-18 09:58:52 +01:00
Luke Barnard
bbcf2fea53
Fix e2e image thumbnail spinner containing box correct size
2018-05-18 09:47:49 +01:00
Luke Barnard
b28ed6075b
Implement slightly hacky CSS soln. to thumbnail sizing
...
As the slightly nicer alternative to fixupHeight being applied once
we actually have a timelineWidth.
The niceness comes from not needing timelineWidth, which means we can
implement at render time with CSS. (Despite still calculating aspect
ratios when we render.)
2018-05-17 18:15:34 +01:00
David Baker
a7006307bf
Call afterComponentDidMount() after componentDidMount
2018-05-17 16:50:16 +01:00
David Baker
e53497421e
Fix image size jumping regression
...
Fixes https://github.com/vector-im/riot-web/issues/6654
2018-05-17 16:47:17 +01:00
Luke Barnard
ff0254d346
Fix ContextualMenu imports for TagTile and code block copy button
2018-05-14 17:36:57 +01:00
David Baker
b6e317647a
Fix stickers briefly being 2x the size
...
fixupHeight was the only thing actually fixing the size of the
sticker image to be the size we want it rather than the pixel size
of the image, and this was only getting run after the image loaded,
causing a flash of 2x image.
2018-05-14 13:41:41 +01:00
Matthew Hodgson
afb9e1f5f4
blind fix to the overlapping sticker bug
2018-05-08 09:50:06 +01:00
Matthew Hodgson
af5be5c36c
appease the fascist linter
2018-05-05 22:28:09 +01:00
Matthew Hodgson
14bcfdd5c6
fix NPE
2018-05-05 22:08:37 +01:00
Michael Telatynski
f2102e283c
Merge branches 'develop' and 't3chguy/m.relates_to' of github.com:matrix-org/matrix-react-sdk into t3chguy/m.relates_to
2018-05-02 13:08:38 +01:00
Matthew Hodgson
5749fbcff9
Merge pull request #1864 from matrix-org/matthew/blob_urls
...
Switch back to using blob URLs for rendering e2e attachments
2018-04-30 19:01:58 +01:00
Michael Telatynski
41af9f7a96
fix changed method name
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-04-29 08:23:35 +01:00
Matthew Hodgson
db5fc53853
final comment
2018-04-29 04:53:32 +01:00
Matthew Hodgson
8538cc1666
fix regressions introduced by 00b7cc512b
2018-04-29 04:41:30 +01:00
Matthew Hodgson
be523b3edc
lint
2018-04-29 04:31:30 +01:00
Matthew Hodgson
551d3ebda0
correctly fix up thumbnail height onload.
...
fixes https://github.com/vector-im/riot-web/issues/6492 , although popping is inevitable in
the current implementation as it only fixes up the thumbnail size once the image has loaded.
2018-04-29 04:28:15 +01:00
Matthew Hodgson
731f1fa7d3
clarify another scrolljump bug
2018-04-29 04:00:02 +01:00
Matthew Hodgson
c254d043c5
fix ugly img errors and correctly render SVG thumbnails
...
Fixes https://github.com/vector-im/riot-web/issues/6271
Fixes https://github.com/vector-im/riot-web/issues/1341
2018-04-29 03:58:17 +01:00
Matthew Hodgson
9c5407c21f
revokeObjectURLs
2018-04-29 03:17:55 +01:00
Matthew Hodgson
9701fd32b7
switch back to blob urls for rendering e2e attachments
...
Based on @walle303's work at https://github.com/matrix-org/matrix-react-sdk/pull/1820
Deliberately reverts 8f778f54fd
Mitigates XSS by whitelisting the mime-types of the attachments so that malicious ones
should not be recognised and executed by the browser.
2018-04-29 03:07:31 +01:00
David Baker
53528f338a
Replace document.origin with window.location.origin
...
document.origin is not a thing on firefox
2018-04-26 10:43:52 +01:00