Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Descriptions don't stay hidden when the view is refreshed or changed #1903

Open
znoteer opened this issue Oct 21, 2022 · 5 comments
Open

Descriptions don't stay hidden when the view is refreshed or changed #1903

znoteer opened this issue Oct 21, 2022 · 5 comments

Comments

@znoteer
Copy link

znoteer commented Oct 21, 2022

I was viewing shaares with a certain tag to make some modifications. When finished, I rolled up all the descriptions of those shaares and clicked the X on the filtered tag to get back to the list of all shaares. When the unfiltered list of shaares finished loading, the shaare descriptions that I'd hidden were visible again. I closed the descriptions again.

The page was set to show 20 shaares/page. I decided I wanted 100. When the page refreshed with 100 shaares, the descriptions that I'd hidden were again visible. I rolled them closed again. Then just for giggles refreshed the page with the refresh icon. The descriptions I'd closed were open yet again.

I was expecting the descriptions I'd closed to stay that way. I'd certainly find it useful. Thanks.

@nodiscc
Copy link
Member

nodiscc commented Oct 23, 2022

the descriptions that I'd hidden were again visible.
I was expecting the descriptions I'd closed to stay that way. I'd certainly find it useful.

The collapsed/un-collapsed state of each shaare is not persistent as there is nowhere to store it. Always has been.

As the only way to store it would be updating the datastore every time a shaare description is collapsed/uncollapsed (or use the browser's localstorage which would not persist across devices anyway), I'm in favor of marking this wontfix for the sake of simplicity. Also not all templates have the collapse/uncollapse feature.

@ArthurHoaro
Copy link
Member

While I agree with you, this could be handled in the frontend only and easily be done by a custom script and eventually included in a plugin.

or use the browser's localstorage which would not persist across devices anyway

If I understand correctly @znoteer's use case, it would be helpful when you are doing some sort of ordering or actions in a specific list of bookmarks, so I think it would be fine to persist only on that device.

@ArthurHoaro ArthurHoaro added the javascript client-side rendering label Nov 25, 2022
@znoteer
Copy link
Author

znoteer commented Nov 29, 2022

My use case is simple. Most of the time I don't need to see the description. When the description is rolled up out of view, more shaares are visible in the vertical space of the browser window. That means less scrolling when reviewing a given list.

@nodiscc
Copy link
Member

nodiscc commented Nov 29, 2022

Related #1328 ("Compact" link list view)

@nodiscc
Copy link
Member

nodiscc commented Jul 3, 2023

Another (maybe simpler) solution to consider would be adding a new setting "descriptions_default_collapsed": true/false, which would affect the default collapsed/uncollapsed state of descriptions when the linklist page is loaded.

While this doesn't address the remember collapsed/uncollapsed state of each description across page loads part of this feature request, this may solve this particular need:

My use case is simple. Most of the time I don't need to see the description.

As a reminder, clicking a shaare's collapse/uncollapse button toggles the style attribute between <div class="linklist-item-description" style="display: block;"> and <div class="linklist-item-description" style="display: none;">. It is not handled in the template at all, but purely in js at https://github.com/shaarli/Shaarli/blob/master/assets/default/js/base.js#L173.

@nodiscc nodiscc added feature and removed wontfix template HTML rendering labels Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants