Skip to content
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

chore(ui): Clean up settings component for shared uses #34090

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

agg23
Copy link
Contributor

@agg23 agg23 commented Dec 19, 2024

Separated out changes for settings from #34010 and #34058.

@agg23 agg23 requested a review from pavelfeldman December 19, 2024 14:55
@agg23 agg23 changed the title chore(trace-viewer): Clean up settings component for shared uses chore(ui): Clean up settings component for shared uses Dec 19, 2024

This comment has been minimized.

@pavelfeldman
Copy link
Member

Does it change UI? If it does, please attach before / after screenshots!

};
return (
<div className='vbox settings-view'>
{settings.map(({ value, set, name, title }) => {
Copy link
Member

Choose a reason for hiding this comment

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

If setting becomes a class, destructuring will cause problems (illegal this in set invocation)

@@ -15,25 +15,27 @@
*/

.settings-view {
display: flex;
Copy link
Member

Choose a reason for hiding this comment

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

nit: you are using it in combination with vbox, you are flex already. we would usually either use vbox or define flex style, but not both.

type='checkbox'
id={labelId}
checked={value}
onChange={() => set(!value)}
Copy link
Member

Choose a reason for hiding this comment

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

That'll probably cause re-render - you know better though!

Copy link
Contributor Author

@agg23 agg23 Dec 19, 2024

Choose a reason for hiding this comment

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

It does. There's a lot of rerender perf issues present right now across the UI. That will be a future PR if we decide to fix it.

}

.settings-view .setting input {
margin-right: 5px;
}
flex-shrink: 0;
}
Copy link
Member

Choose a reason for hiding this comment

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

we like new lines in the end of file :P

Copy link
Contributor

Test results for "tests 1"

9 flaky ⚠️ [firefox-page] › page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsercontext-clearcookies.spec.ts:116:3 › should remove cookies by path @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsercontext-har.spec.ts:327:3 › should record overridden requests to har @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/proxy.spec.ts:93:11 › should proxy local network requests › with other bypasses › localhost @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-leaks.spec.ts:82:5 › click should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-leaks.spec.ts:107:5 › fill should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-leaks.spec.ts:161:5 › waitFor should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-set-input-files.spec.ts:205:3 › should upload multiple large files @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

37388 passed, 650 skipped
✔️✔️✔️

Merge workflow run.

@agg23 agg23 merged commit 7d3a188 into microsoft:main Dec 19, 2024
29 checks passed
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.

2 participants