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

[Vue Rewrite] Add Unread Item Route and switch to 3 panel-layout #2333

Merged
merged 7 commits into from
Aug 26, 2023

Conversation

devlinjunker
Copy link
Contributor

@devlinjunker devlinjunker commented Aug 25, 2023

Related to #748

Follows #2321

🗒️ Summary

Added a new route and component for displaying the unread items, this helped me understand how to use the VirtualScroll component better.

  • Realized that using VirtualScroll prevented us from "Expanding" items like the old UI was designed because when you scroll to read the expanded FeedItem it would no longer be in view and would be removed (make it impossible to read a long FeedItem)
  • Created FeedItemDisplay component for showing the current selected FeedItem (this being separate from the VirtualScroll component means we can scroll and still view the last FeedItem the user clicks on)
  • Started on 3 Panel Layout and FeedItemDisplayList component for managing showing the list and the selected Item in the 3rd FeedItemDisplay panel
  • Re-used FeedItemDisplayList component in the Starred and Unread components

Started on Keep Unread and Star/Unstar actions

  • made sure that the icons and css styles update to reflect these actions
  • make requests state to manage star/unread count and to backend to star or mark read/unread items

Also started creating Service classes to handle backend requests and prevent duplicating logic

  • Created Item Service that is used to communicate Item based requests to the API layer
  • Added lodash as well, so we can easily debounce the requests to the backend

✅ Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
    - [ ] Changelog entry added for all important changes. (Can we add the skip-changelog label to prevent the check for changelog? )

📷 Visual

New 3 Panel Layout
3panel

Virtual Scroll with 100+ items or just 2 items (starred)
Aug-24-2023 17-33-50

➡️ Up Next

  • Reuse VirtualScroll component for:
    • display items in a feed
    • display items in a folder
    • display all items in database
  • (WIP) Move API Requests to Service Classes (to be shared between stores and prevent stuff like having to duplicate api requests like here…)
  • Sidebar Actions (WIP)
  • Quick access to Settings
  • Update Documentation
  • Mobile friendly layout

- started on unread component and using load-more callback from VirtualScroll component
- realized we need to change to a 3-panel display because VirtualScroll removes the rendered component even when open if you scroll too much
- created FeedItemDisplay component to display a selected feed item details

Signed-off-by: Devlin Junker <[email protected]>
Signed-off-by: Devlin Junker <[email protected]>
- Reused by Starred and Unread route components

Signed-off-by: Devlin Junker <[email protected]>
Signed-off-by: Devlin Junker <[email protected]>
@Grotax Grotax added the Skip-Changelog No changelog update is required, minor change label Aug 25, 2023
@Grotax
Copy link
Member

Grotax commented Aug 25, 2023

I just tried it on my docker dev setup with over 800 items and it works great.

Page load speed is also nice, with the old UI we have these strange artifacts during loading 😄

@Grotax Grotax merged commit d4d20e9 into nextcloud:vue-rewrite Aug 26, 2023
20 of 21 checks passed
@devlinjunker devlinjunker changed the title Add Unread Item Route and switch to 3 panel-layout [Vue Rewrite] Add Unread Item Route and switch to 3 panel-layout Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip-Changelog No changelog update is required, minor change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants