-
Notifications
You must be signed in to change notification settings - Fork 647
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
feat(server): add compare different url #457
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
thanks for the PR @pndllxzzy! It gets a little crowded by sticking it up there though and the click target moves when you hover because of "Open Report" :/ Other ideas:
|
@patrickhulce Thanks for your ideas.Do you mean like this? |
Yeah, that seems to get the job done even if it's not the prettiest (not referring to your implementation being not pretty, I know it was my suggestion 😄 ). WDYT? |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@patrickhulce I agree with you. I'm not good at beautiful layout. If you have any ideas, please tell me.🤝🏻 |
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.
thanks @pndllxzzy this is great! I think you might need to update some snapshot tests as well?
@@ -113,13 +113,14 @@ export function computeAuditGroups(lhr, baseLhr, options) { | |||
return auditGroups; | |||
} | |||
|
|||
/** @param {{hookElements: LHCI.HookElements<'dropdowns'>, selectedAuditId?: string | null, lhr?: LH.Result, baseLhr?: LH.Result, percentAbsoluteDeltaThreshold: number, setPercentAbsoluteDeltaThreshold: (x: number) => void}} props */ |
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 think we can leave this just as dropdowns
it was already set to be plural for more than one.
use a fragment when it's used instead?
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.
Do you mean like this?
<LhrComparison
...
hookElements={{
...
dropdowns: (
<Fragment>
<Dropdown
label="Base Url"
className="dropdown--url dropdown--base-url"
value={baseUrl}
setValue={url => {
const to = new URL(window.location.href);
to.searchParams.set('baseUrl', url);
to.searchParams.set('compareUrl', compareUrl);
route(`${to.pathname}${to.search}`);
}}
options={availableUrlOptions}
/>
<Dropdown
label="Compare Url"
className="dropdown--url dropdown--compare-url"
value={compareUrl}
setValue={url => {
const to = new URL(window.location.href);
to.searchParams.set('baseUrl', baseUrl);
to.searchParams.set('compareUrl', url);
route(`${to.pathname}${to.search}`);
}}
options={availableUrlOptions}
/>
</Fragment>
),
}}
/>
@@ -126,7 +130,7 @@ const BuildView_ = props => { | |||
lhr={lhr} | |||
isDimmed={openBuildHash === 'base'} | |||
isOpen={openBuildHash === 'compare'} | |||
setLhrLinkHover={setLhrLinkHover} | |||
setLhrLinkHover={setLhrCompareLinkHover} |
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.
nice split 👍
dropdowns: ( | ||
dropdownsBase: ( | ||
<Dropdown | ||
label="BaseUrl" |
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.
label="BaseUrl" | |
label="Base URL" |
label="URL" | ||
className="dropdown--url" | ||
value={selectedUrl} | ||
label="CompareUrl" |
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.
label="CompareUrl" | |
label="Compare URL" |
@patrickhulce How to update snapshot? |
Yep! I tend to use |
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.
just these two leftover from previous review but other than that looks good with test fixes! :) thanks for doing this @pndllxzzy
Co-authored-by: Patrick Hulce <[email protected]>
Co-authored-by: Patrick Hulce <[email protected]>
@patrickhulce Should I rebase all commits to one? |
Don't worry about it we'll squash when we merge :) I'll take a closer look here tomorrow 👍 |
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.
thanks for sticking with this @pndllxzzy! 🎉
No description provided.