Jérémie Astori
bb16b3e30b
Simplify showing/hiding "More" button of a new preview on active channel
2018-04-09 21:39:41 -04:00
Jérémie Astori
d55420faae
Bind a single resize event, debounced, instead of one handler per preview
2018-04-09 21:39:41 -04:00
Jérémie Astori
dbabdd83dc
Lighten the "More" button handler when checks are not necessary
2018-04-09 21:39:40 -04:00
Jérémie Astori
8d255fc331
Only bind preview "More" buttons on link previews
2018-04-09 21:39:40 -04:00
Jérémie Astori
1ccdeb015c
Trigger the correct event directly instead of resize when opening/closing a menu
2018-04-09 21:39:39 -04:00
Jérémie Astori
53a2101de3
Make sure preview "More" button computation does nothing when preview is collapsed
2018-04-09 21:39:39 -04:00
Jérémie Astori
5bff07f6f6
Fix handling preview More buttons on inactive channels
2018-04-09 21:39:38 -04:00
Jérémie Astori
527cac4c75
Debounce resize event to avoid performance bottleneck
2018-04-09 21:39:38 -04:00
Jérémie Astori
7355db94d6
Improve UI of previews
...
- Remove margins around thumbnails and images, increase radius, etc. for a fresher look overall
- Increase preview body contrast just enough to pass AA standards
- Add a `More`/`Less` button to expand previews that take more than one line. Button is added only when necessary
- Use a zoom-in cursor on hover for thumbnails
- Improve preview message errors
2018-04-09 21:39:38 -04:00
Pavel Djundik
77a98bfd14
Render video and audio previews only after canplay event fires
2018-03-19 12:47:36 +02:00
Pavel Djundik
b6cde34a08
Automatically focus input when typing into nothing
2018-03-16 18:11:02 +02:00
Jérémie Astori
00bca229f0
Enforce object literal shorthand syntax with ESLint
2018-03-15 00:22:09 -04:00
Pavel Djundik
63828b95e0
Always correctly trigger sticky scroll on .chat container
...
`.chat` has the overflow on it, and not `.messages` so stuff like scrollTop only works on `.chat`
2018-02-23 18:21:42 +02:00
Pavel Djundik
59ec07be87
Update all links to thelounge repository
2018-02-21 22:47:52 -05:00
Pavel Djundik
c733e72e7a
Auto-fix code for padding-line-between-statements rule
2018-02-20 09:28:04 +02:00
Pavel Djundik
12bbaef4ab
Unbind image events after the image is loaded
2018-02-08 14:54:57 +02:00
Pavel Djundik
85cb039426
Still render link previews if image fails to load
2018-02-07 17:40:15 +02:00
Pavel Djundik
6d6b5cb2a9
Remove deprecated jQuery calls
...
Fixes #2011
2018-02-01 12:15:51 +02:00
Pavel Djundik
b4951b1f86
Fix auto-open media option not working
...
Bug introduced in ffa9685b41
2018-02-01 09:57:15 +02:00
Pavel Djundik
e98291dd3f
Preload preview images before appending them to DOM
2017-12-29 12:30:15 +02:00
Jérémie Astori
f725e944dd
Add (semi-working) image viewer support for images shown in changelogs
...
Semi-working because this does not support Preview/Next. The existing image viewer is very custom to in-channel message previews and expects a certain markup, that needs rework tobe more generic.
2017-12-25 17:44:55 -05:00
Pavel Djundik
6862c2e6b0
Trigger keep to bottom for previews correctly
2017-11-26 15:49:31 +02:00
Pavel Djundik
2f84b01427
Do not keep scroll to bottom in inactive channels
2017-11-23 19:33:19 +02:00
Jérémie Astori
2c0fc67ab9
Use Mousetrap for image viewer shortcuts
2017-09-23 22:02:13 -04:00
Jérémie Astori
a921d7bf04
[Squash me] Fix bug refusing to switch channel when clicking back after closing image viewer
2017-09-10 15:00:27 -04:00
Jérémie Astori
b33ea0f567
Squash me when ready
2017-09-10 14:28:00 -04:00
Jérémie Astori
bb432497be
Handle browser history when opening/closing image preview
2017-09-09 16:40:34 -04:00
Pavel Djundik
67da82c151
Fix image viewer turning black sometimes
2017-09-09 18:46:49 +03:00
Jérémie Astori
853e646670
Move condense caret to the right, animate transition, add hover state (with transition), reuse thumbnail toggle style
2017-08-13 16:16:38 -04:00
Jérémie Astori
157289258a
Keep track of preview visibility on the server so it persists at page reload
2017-07-26 18:16:50 -04:00
Pavel Djundik
45a2d074fb
Remove focus from input when opening image viewer
...
Fixes #1342
2017-07-25 18:07:14 +03:00
Jérémie Astori
8259b0924b
Merge pull request #1367 from thelounge/astorije/fix-viewer-cycle
...
Fix image viewer cycling when some previews are hidden
2017-07-24 19:21:49 -04:00
Jérémie Astori
5b60bb0b0c
Remove background blur filter/transition when opening the image viewer
2017-07-24 02:31:12 -04:00
Jérémie Astori
60b531a174
Fix image viewer cycling when some previews are hidden
2017-07-24 02:14:14 -04:00
Jérémie Astori
b9f17b77ab
Add Previous/Next cycling buttons to the image viewer
2017-07-23 13:14:27 -04:00
Pavel Djundik
30f40ee448
Fix remaining issues with link previews
...
Fixes #1357
2017-07-21 19:39:06 +03:00
Jérémie Astori
900d41bf47
Re-use .previews
to order incoming previews instead of extra links
2017-07-21 01:51:51 -04:00
Jérémie Astori
1c8ea0b75c
Fix preserved whitespace-related issues for previews by separating them from main text
2017-07-21 01:50:09 -04:00
Jérémie Astori
511b173b6f
Add an image viewer for thumbnails and image previews
2017-07-16 19:25:48 -04:00
Jérémie Astori
28200830ed
Move preview toggle buttons next to their respective URLs and switch from ellipsis to caret
2017-07-08 04:36:26 -04:00
Jérémie Astori
64ebe0f437
Support multiple previews per message
...
- Load up to 5 previews per message (to avoid abuse)
- Do not load multiple times the same URL
- Prepare preview containers per message instead of appending (to maintain correct order)
- Store an array of previews instead of a single preview in `Msg` objects
- Consolidate preview rendering for new messages and upon refresh/load history (when rendering entire channels)
- Update `parse` tests to reflect previous point
- Add test for multiple URLs
- Switch preview tests from `assert` API to `expect` API
2017-07-08 04:34:12 -04:00