-
Notifications
You must be signed in to change notification settings - Fork 91
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
Highlights the previously selected query #1006
Highlights the previously selected query #1006
Conversation
50b5829
to
1aad577
Compare
groups: any[]; | ||
constructor(props: ISampleQueriesProps) { | ||
super(props); | ||
this.resetCollapse = true; | ||
this.groups = []; |
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.
The variables groups
and resetCollapse
can be declared and initialized at the point of declaration instead of declaring outside the constructor then initialising inside the constructor
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.
On taking a second look, the two variables groups
and resetCollapse
are not necessary, since the selectedQuery
state variable is present
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.
if (prevProps.samples.queries !== this.props.samples.queries) { | ||
this.groups = generateGroupsFromList(sampleQueries, 'category'); |
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.
Calculating it close to its point of need prevents having to track its location and state elsewhere in the page
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.
I removed it with 8c67a81 since your suggestion had it closer together to where it was needed
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
This reverts commit 47ba6c3.
* Feature: Highlights the previously selected query (#1006) * Task: upgrade packages flagged by dependabot (#1054) * Task: Fluent upgrade (#1056) * Fix: ProfileType persistence (#1074) * Enhancement: error hints (#1060) * Bug: Persisting request body (#1055) * Fix: Sample queries UI bugs (#1084) * Fix: Disable aria-required children rule (#1080) * Task: Fix failing profile test (#1086) * Enhancement: permissions radio buttons change (#1087) * Task: add English file transfer automation (#1075)
Overview
Demo
Graph.Explorer.and.16.more.pages.-.Work.-.Microsoft.Edge.2021-08-04.22-33-08.mp4
Testing Instructions