refactor: remove default filter from frontend, apply by default to new list views instead #2240

Merged
konrad merged 3 commits from waza-ari/vikunja:2234-remove-default-filter into main 2024-04-02 13:49:41 +00:00
Contributor

Fixes #2234

Fixes #2234
waza-ari added 1 commit 2024-03-29 16:25:54 +00:00
Member

Hi waza-ari!

Thank you for creating a PR!

I've deployed the frontend changes of this PR on a preview environment under this URL: https://2240-2234-remove-default-filter--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somewhere. The easiest to use is https://try.vikunja.io/.

This preview does not contain any changes made to the api, only the frontend.

Have a nice day!

Beep boop, I'm a bot.

Hi waza-ari! Thank you for creating a PR! I've deployed the frontend changes of this PR on a preview environment under this URL: https://2240-2234-remove-default-filter--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somewhere. The easiest to use is https://try.vikunja.io/. This preview does not contain any changes made to the api, only the frontend. Have a nice day! > Beep boop, I'm a bot.
konrad requested changes 2024-03-29 17:22:39 +00:00
Dismissed
@ -0,0 +48,4 @@
for _, view := range projectViews {
if view.ViewKind == 0 && view.Filter == "" {
view.Filter = "done = false"
_, err := tx.ID(view.ID).Update(view)
Owner

Please do this in one query instead of a loop, something like this:

tx.Where("view_kind = ? AND filter = ?", 0, "").Cols("filter").Update(&projectView20240329170952{Filter: ""})
Please do this in one query instead of a loop, something like this: ``` tx.Where("view_kind = ? AND filter = ?", 0, "").Cols("filter").Update(&projectView20240329170952{Filter: ""}) ```
Author
Contributor

Good point, that's much simpler :)

Good point, that's much simpler :)
waza-ari marked this conversation as resolved
waza-ari added 1 commit 2024-03-29 17:39:55 +00:00
continuous-integration/drone/pr Build is failing Details
9efc5e22e1
refactor: simplify migration to single query
Owner

Now lint and test fails :/

Now lint and test fails :/
waza-ari added 1 commit 2024-03-29 18:51:10 +00:00
continuous-integration/drone/pr Build is failing Details
55a425c4d7
style: Update should be checked for errors
konrad force-pushed 2234-remove-default-filter from 55a425c4d7 to 7cc42e55e2 2024-04-02 13:32:31 +00:00 Compare
konrad approved these changes 2024-04-02 13:33:03 +00:00
konrad scheduled this pull request to auto merge when all checks succeed 2024-04-02 13:33:26 +00:00
konrad merged commit f0d695e789 into main 2024-04-02 13:49:41 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#2240
No description provided.