Skip to content

Add query param view for smart view views#1422

Merged
Davy-c merged 3 commits intofeat/default-view-inselectorfrom
feature/add-smart-view-query
Jan 18, 2022
Merged

Add query param view for smart view views#1422
Davy-c merged 3 commits intofeat/default-view-inselectorfrom
feature/add-smart-view-query

Conversation

@Komediruzecki
Copy link
Copy Markdown
Contributor

@Komediruzecki Komediruzecki commented Jan 3, 2022

Add query param view for smart view views

Tested with invalid queries and valid view IDs, like:
http://localhost:3001/testspace/dashboard?view=20 after creating the views with those IDs.

Tested with folder/workspace as well:
http://localhost:3001/testspace/Sprint-meeting-fDdf3f8586d2004bba9b1bf5df0b423ce2?view=26

Short video showcase:

ViewQueryManager_2022-01-04.21-09-05.mp4

Comment thread src/cloud/components/Views/index.tsx Outdated
setSelectedViewId(viewToLoad.id)
}
} catch (_) {
// leave selected view as is
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please check existence of the view before selecting instead of throwing an error without proper handling.

Comment thread src/cloud/components/Views/index.tsx Outdated

const selectViewId = useCallback(
(id: number) => {
replace(`?view=${id}`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it intended? Is there any reasons to use replace instead of push? I think we should use push so users can switch views by back and forward button of their browser.

@Komediruzecki Komediruzecki force-pushed the feature/add-smart-view-query branch from cddb8f4 to 05a1639 Compare January 5, 2022 22:58
Add query view for folder and workspace copy link
@Davy-c Davy-c changed the base branch from master to feat/default-view-inselector January 18, 2022 01:06
@Davy-c Davy-c merged commit 10e6b8e into feat/default-view-inselector Jan 18, 2022
@Davy-c Davy-c deleted the feature/add-smart-view-query branch January 18, 2022 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants