-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix: add version select #215
Conversation
* add urlVersions type * add version handler function * add version dropdown * change the version to lowerCase * change the url version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current version of Graph Explorer changing the version in the URL changes the selected version in the version dropdown. I am assuming this is how this feature should behave as well. @bettirosengugi is this correct?
@bettirosengugi a while back there was the issue reported by @jthake-msft where for certain screen sizes the http methods were shown to have an ellipsis ie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes so that this is merged after we have resolved the ongoing conversations.
@jobala why don't we have the same issue in classic yet it has the three tabs (Request Options, Version and query tabs) ? May be investigate? |
This is correct to give an example if the version selected is V1, the url for /me should be https://graph.microsoft.com/v1.0/me and when you change the version to beta the url should change to https://graph.microsoft.com/beta/me and the selected version should show on the drop down tab. |
There's also a third type of url version |
That's a good question. AFAIK classic uses MWF and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const requestUrl = query.url.replace(GRAPH_URL, '');
const queryVersion = requestUrl.substring(1, 5);
The above code snippet has been duplicated in various places. It will be wise to abstract it into a function.
Why do we need a reducer and an action-creator for the version selector?
Now changes when you change the url in the editor. Good catch @jobala
I have improved the column definitions to reduce the need for the ellipsis in smaller screen sizes
I have added a utility function for reuse for this.
The version is used and changed at different points of the application. |
* Add version select (microsoftgraph#205) * add urlVersions type * add version handler function * add version dropdown * change the version to lowerCase * change the url version * moves version selection to redux * moves state properties from query runner to input * changes to appropriate query version when query clicked * adds tests for SELECT_VERSION_SUCCESS * adds displayRequestComponent toggle for try it * renames selectQueryVersion to setQueryVersion * describes options variable as urlVersion | method * creates and utilises a function to parse urls to sample urls * sets the selected version when editor changed * increases control sizes to reduce ellipsis use * moves selectedVersion to sampleQuery property
Overview
Adds a version selector option
The version selection changes automatically when you select queries from the sidebar.
Improves #205
Fixes #200
Demo
Testing Instructions