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

feat: Add backend for table archive and favorite flag #865

Merged
merged 23 commits into from
Mar 3, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Feb 22, 2024

Resolves #469

  • Backend
    • Adjust database layout
      • Add archived flag to tables and views
      • Add favorites table that stores if a node (table/view) is favorited by a user
    • Expose archived flag as an option to set through existing API endpoints when updating tables/views
    • Add Controller and Favorite service to mark as favorite and remove favorite
    • First working endpoints
    • Cleanup a bit
    • Adapt other api endpoints that have a comment in routes
    • Proper response format for favorites
    • Add capability for favorites api endpoints
    • Check open api spec annotations
    • Write integration tests
  • Frontend
    • Navigation
      • Remove categories from navigation and just show a plain list (sort favorites first, then by last modification time)
      • Hide archived tables/views in a collapsible entry (like in deck)
    • Archiving
      • Add button to archive/unarchive in the edit table and edit view dialogs
    • Favorites
      • Add action to the menu to mark as favorite and remove from favorites
    • Cypress tests for adding/removing favorites
    • Cypress test for archiving/unarchiving

@juliusknorr juliusknorr added enhancement New feature or request 2. developing Work in progress labels Feb 22, 2024
@juliusknorr
Copy link
Member Author

@elzody I pushed a few more individual commits here

@juliusknorr
Copy link
Member Author

@blizzz A quick backend review would already be appreciated :)

Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backend bits look good!

lib/Service/FavoritesService.php Outdated Show resolved Hide resolved
@juliusknorr
Copy link
Member Author

@elzody I pushed one more fix to also expose the favorite flag on views when they are returned through the API.

@juliusknorr
Copy link
Member Author

Tested what is already there and works like a charm :)

Maybe you can rebase with your next push to latest main branch to resolve the conflict with the merge of #878

@juliusknorr juliusknorr force-pushed the feat/archive-favorites branch 2 times, most recently from a50fca9 to 6948d6f Compare March 1, 2024 09:14
Copy link
Member Author

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot self-approve but for the frontend 👍

juliusknorr and others added 12 commits March 1, 2024 14:09
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
…node id

Signed-off-by: Julius Härtl <jus@bitgrid.net>

tmp: revert to work around segfault

Signed-off-by: Julius Härtl <jus@bitgrid.net>
… only interested in errors

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
elzody and others added 11 commits March 1, 2024 14:09
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr marked this pull request as ready for review March 1, 2024 13:09
@enjeck
Copy link
Contributor

enjeck commented Mar 2, 2024

This is really cool 😎

Not a big deal, but it'll be nice if we eventually indent the views in Archived tables sidebar, so that it's obvious they're part of a specific table:

Here, "view" is a view of "ToDo list", but it's not obvious due to lack of indent:
image

@juliusknorr
Copy link
Member Author

Good catch @enjeck

I'll merge this for now and file follow up tasks for the open items

@juliusknorr juliusknorr merged commit b0e1534 into main Mar 3, 2024
51 checks passed
@juliusknorr juliusknorr deleted the feat/archive-favorites branch March 3, 2024 09:39
@enjeck
Copy link
Contributor

enjeck commented Mar 3, 2024

@juliushaertl Not sure if it's important or not, but I find it weird that the occ command tables:update now has the option --archived, but the title argument is still required. So that means if I wanna archive a table, I'm forced to change the title too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider different sorting or way of organizing the navigation
4 participants