Skip to content

feat(discover): Add visualization to query string - #11467

Merged
lynnagara merged 3 commits into
masterfrom
feat/keep-visualization-in-querystring
Jan 14, 2019
Merged

lynnagara merged 3 commits into
masterfrom
feat/keep-visualization-in-querystring

Conversation

@lynnagara

Copy link
Copy Markdown
Contributor

Discover visualization type can be defined via the URL, visualization
name persists when switching Discover tabs.

Discover visualization type can be defined via the URL, visualization
name persists when switching Discover tabs. Also validates requested
visualization against available visualizations for that particular
query.
@billyvg

billyvg commented Jan 10, 2019

Copy link
Copy Markdown
Member

Query string keeps changing (I think when you navigate with browser history with query it sorts params alphabetically it looks like).

https://cl.ly/5d039d85644f/download/Screen%20Recording%202019-01-10%20at%2001.12%20PM.gif

@lynnagara

Copy link
Copy Markdown
Contributor Author

That query string changing thing seems to be a bug on master. I'm not sure when this started, as saved queries should never have the query in the URL

@billyvg

billyvg commented Jan 11, 2019

Copy link
Copy Markdown
Member

@lynnagara

Copy link
Copy Markdown
Contributor Author

Yeah, i'm starting to think we should always sort so react router works properly

@billyvg

billyvg commented Jan 11, 2019

Copy link
Copy Markdown
Member

Is there a reason not to use query instead of search?

@lynnagara

Copy link
Copy Markdown
Contributor Author

Not that I know of, it's inconsistently used in discover right now. I did a quick fix but it might not be the best solution

@lynnagara

Copy link
Copy Markdown
Contributor Author

Some of the formats used presently might not be very compatible with how query stringifies things

@billyvg

billyvg commented Jan 11, 2019

Copy link
Copy Markdown
Member

The query string still causes some issues if it has parens (e.g. count aggregation)

@lynnagara

Copy link
Copy Markdown
Contributor Author

Damn, tried to fix this by passing it through the original function again. Another option would be to switch everything to use query but in the interests of wanting to keep the URL unchanged just went with this

@lynnagara
lynnagara requested a review from billyvg January 11, 2019 22:08
@lynnagara

Copy link
Copy Markdown
Contributor Author

@billyvg How do you feel about merging this?

@billyvg billyvg left a comment

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.

@lynnagara The query string is still switching because of the parens, but since it's not any worse than what's currently on prod, I'd say it's still a net win if we merged.

@lynnagara
lynnagara merged commit a83e707 into master Jan 14, 2019
@lynnagara
lynnagara deleted the feat/keep-visualization-in-querystring branch January 14, 2019 19:24
@lynnagara

Copy link
Copy Markdown
Contributor Author

@billyvg How did you trigger the switching behaviour? I thought that was fixed by the last commit

@billyvg

billyvg commented Jan 14, 2019

Copy link
Copy Markdown
Member

Switching between query and saved query

@github-actions github-actions Bot locked and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants