hfaran / slack-export-viewer

A Slack Export archive viewer that allows you to easily view and share your Slack team's export
https://pypi.python.org/pypi/slack-export-viewer
MIT License
966 stars 193 forks source link

Make images responsive and prevent hyperlinks from being wider than viewport #160

Closed gitname closed 2 years ago

gitname commented 2 years ago

Summary of changes:

  1. Preview images are now responsive.
    • Previously, if a preview image was wider than the content area, it would still be displayed at its full size and the content area would have a horizontal scrollbar.
    • Now, the image will be "shrunken" down to fit within the content area, and will no longer cause a horizontal scrollbar to appear. This is shown in the following two screenshots.
    • image
    • image
    • Exception: :warning: I have noticed that, if an image does not load (e.g. the referenced image does not exist), the resulting "placeholder box" is not responsive; in which case, a horizontal scrollbar does appear (screenshot below).
    • image
  2. Long hyperlinks now wrap at any character.
    • Previously, some hyperlinks could be wider than the content area, causing the content area to have a horizontal scrollbar.
    • Now, those hyperlinks wrap, and will no longer cause a horizontal scrollbar to appear.
  3. The messages now have a margin on the right and bottom.
    • Previously, the messages would touch the right edge of the viewport (i.e. no margin). Similarly, the final message would touch the bottom edge of the viewport (i.e. no margin).
    • Now, there is a 20-pixel margin in both places.