Skip to content
Snippets Groups Projects

Fix #399 Make max attachments configurable

Merged Fix #399 Make max attachments configurable
1 unresolved thread
Merged Shpuld Shpludson requested to merge feat/max-attachments-configurable into develop
1 unresolved thread

Default value is 16 attachments (4 rows of 4 thumbnails) to bump it up from the previous hard coded 9. There's no absolute max for the user configured max amount.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
186 187 },
187 188 useContainFit (value) {
188 189 this.$store.dispatch('setOption', { name: 'useContainFit', value })
190 },
191 maxThumbnails (value) {
192 if (value < 0) {
193 value = 0
194 this.maxThumbnails = 0
  • Maintainer

    Looks ok. Two suggestions:

    1. Make it instance-configurable
      • people will be less angry for developer-imposed limitations, so that smug for example can bump it to 32 or infinity (see pt.2) or something
      • would be easier for admins to tweak value if someone starts bombing helltachments-filled posts
    2. Currently only removing limit would be setting it to something ridiculous like 99999, which seems a bit like bad UX, so I'd add a separate option to enable/disable limit. For example Limit displayed attachment previews [x](default true) amount: [ 12](suboption)

    either way it could be made into separate issues/mrs. Feel free to merge it in as is.

  • Author Maintainer

    feel free to create more issues about it and further develop it, I'm not interested in taking it any further

  • added 1 commit

    • 78d9d8c9 - simplify maxThumbnails value fixing

    Compare with previous version

  • Maybe an MRF Policy so incoming posts can be limited, while on local maxThumbnails is set to whatever.

    This can be user configured, so the server/BE pipes the images raw into the client maxThumbnails at a time, on scroll or load more button.

    Defaults whatever, don't care, let the admin set their default, users navigator.storage.persist() whatever they want.

    E.g. smug 90+ image post incomes to kawen set to 4, BE has entire copy, but kawen loads 4 images at a time of the post as it scrolls or clicks load more, while smug just loads the 90+ and let's the client deal with the load.

    Edited by NotZemichi
  • Author Maintainer

    that's not really the issue that servers have with it, and adding partial loading for images would be such a wasted effort when 90% of posts with attachments contain 1 attachment, and most of the remaining ones contain 4 or less. the whole thing really is a non-issue

  • mentioned in commit 058238c3

  • Please register or sign in to reply
    Loading