René's URL Explorer Experiment


Title: refactor(css): attribute selectors match web counterparts by bundyo · Pull Request #7848 · NativeScript/NativeScript · GitHub

Open Graph Title: refactor(css): attribute selectors match web counterparts by bundyo · Pull Request #7848 · NativeScript/NativeScript

X Title: refactor(css): attribute selectors match web counterparts by bundyo · Pull Request #7848 · NativeScript/NativeScript

Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. You have signed the CLA. All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/DevelopmentWorkflow.md#running-unit-tests. Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/WritingUnitTests.md. What is the current behavior? Since the new Theme 2.x produces bigger CSS and uses Element selector styling, the matched elements on the page are more and performance suffers. There are demo projects in the linked issue. What is the new behavior? Exclude ProxyViewContainer from the CSS selector matching/init. Optimize some of the matchers and the selector query. Rework the attribute selectors to use exact matching, instead of regular expressions (as is done in browsers). Fixes/Implements/Closes NativeScript/theme#179. BREAKING CHANGES: Classes set on ProxyViewContainer will probably not work anymore. We might consider moving them to the wrapped element - either automatically in core modules or by the user?

Open Graph Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. ...

X Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. ...

Opengraph URL: https://github.com/NativeScript/NativeScript/pull/7848

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8ca95a2a-e8d5-8c7b-5f39-e60e1d5ad6ec
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDEF8:F5443:4F278A3:6B8AA9F:69731742
html-safe-nonce2bfe4b1dc05f65029ed855393c7887d116f964a401afdf27200189c7d03f3423
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUY4OkY1NDQzOjRGMjc4QTM6NkI4QUE5Rjo2OTczMTc0MiIsInZpc2l0b3JfaWQiOiI4NTQ5OTM1NDAwMTMyNzQ1MDI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccd1cbe0d856681a3dbffc85a23be7bd1eda5dbe932e3047317b27198758f87ee
hovercard-subject-tagpull_request:319749585
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/7848/files
twitter:imagehttps://avatars.githubusercontent.com/u/98318?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/98318?s=400&v=4
og:image:altPR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea5e2b48bd1260476599758f5d253b5d24092ab84
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/pull/7848/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F7848%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F7848%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/pull/7848/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/7848/files
Reloadhttps://github.com/NativeScript/NativeScript/pull/7848/files
NativeScript https://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/7848/files
Notifications https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.4k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://github.com/NativeScript/NativeScript
Issues 869 https://github.com/NativeScript/NativeScript/issues
Pull requests 59 https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects 0 https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security 0 https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
Code https://github.com/NativeScript/NativeScript
Issues https://github.com/NativeScript/NativeScript/issues
Pull requests https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
vtrifonovhttps://github.com/vtrifonov
masterhttps://github.com/NativeScript/NativeScript/tree/master
bundev/css-selector-optimizationhttps://github.com/NativeScript/NativeScript/tree/bundev/css-selector-optimization
Conversation 10 https://github.com/NativeScript/NativeScript/pull/7848
Commits 16 https://github.com/NativeScript/NativeScript/pull/7848/commits
Checks 0 https://github.com/NativeScript/NativeScript/pull/7848/checks
Files changed https://github.com/NativeScript/NativeScript/pull/7848/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/7848/files
refactor(css): attribute selectors match web counterparts https://github.com/NativeScript/NativeScript/pull/7848/files#top
Show all changes 16 commits https://github.com/NativeScript/NativeScript/pull/7848/files
22f7ef2 Improve CSS selector parsing/matching by 30% - 40% bundyo Sep 20, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/22f7ef2c0af7b41c1afd2959699b19fc8451df0c
f271cc9 Merge branch 'master' into bundev/css-selector-optimization manoldonev Nov 19, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/f271cc9358d16b84a7055cb3c48548bf8729e377
cc9f398 Merge branch 'master' into bundev/css-selector-optimization manoldonev Nov 19, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/cc9f3983bd5b0ee8d66bbd2fa7d0e00f78fca911
9377b21 fix: selector match manoldonev Nov 19, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/9377b2145f9deec7c9fbad101e30f6ad41763aca
2308fd9 fix: lint errors manoldonev Nov 19, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/2308fd9cb37d667c35f2ec4cbee31f957c661d3e
cd987d6 refactor: restore processing of ProxyViewContainer manoldonev Nov 21, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/cd987d64d0aef6b4c10661760af4397a4b36858c
db29a9f Merge branch 'master' into bundev/css-selector-optimization manoldonev Nov 21, 2019 https://github.com/NativeScript/NativeScript/pull/7848/commits/db29a9fec15f84914d36c5ea85489a59fa8f3a34
628a5c3 Merge branch 'master' into bundev/css-selector-optimization vtrifonov Jan 14, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/628a5c32d1e6713c0eac1095659ad7d9b570c97c
af5ce27 chore: lower the number of expected cycles vtrifonov Jan 17, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/af5ce274633c8d82684baf85ea651974cc0234ea
70ebc40 Merge branch 'master' into bundev/css-selector-optimization vtrifonov Jan 17, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/70ebc40463666b446eb321ce9712ee27d6264ad7
bafef20 Merge branch 'master' into bundev/css-selector-optimization vtrifonov Mar 20, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/bafef2048090b17260bbecff3db859de6bf4c9ff
7ec430b Merge branch 'master' into bundev/css-selector-optimization vtrifonov Mar 20, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/7ec430b2f72153ec171ad2049e8a81c1e3f664d8
b225eb4 Merge branch 'master' into bundev/css-selector-optimization vtrifonov Mar 24, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/b225eb4d15eee0512c940338881bc3453fd97f56
c42d5d6 Merge branch 'master' into bundev/css-selector-optimization vtrifonov Mar 26, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/c42d5d663a2923a7713498be9ceb6022ae192a6f
e5509fc fix: some css selector fixes vtrifonov Mar 26, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/e5509fcdc7009e8971b031da15e75c9cf54ed624
906bd0d Merge branch 'master' into bundev/css-selector-optimization vtrifonov Mar 26, 2020 https://github.com/NativeScript/NativeScript/pull/7848/commits/906bd0d2a5b29e882031e16e7f59111920639530
Clear filters https://github.com/NativeScript/NativeScript/pull/7848/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/7848/files
Please reload this pagehttps://github.com/NativeScript/NativeScript/pull/7848/files
css-selector.d.ts https://github.com/NativeScript/NativeScript/pull/7848/files#diff-03bcd9f7b5ec7fbc844b8fe17309f86c1e2a45cb3ab6dd25b65b0bd52909d1c2
css-selector.ts https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
style-scope.ts https://github.com/NativeScript/NativeScript/pull/7848/files#diff-da4e64b544de41629c8f8b4f1ca32c93c16f4ad07e4dec1f68914c6b49a31d12
webpack.config.js https://github.com/NativeScript/NativeScript/pull/7848/files#diff-6e8810753060620dd6dac533de94d281a23fb4ce32aa58edc727084d4e33e8e2
nativescript-core/ui/styling/css-selector/css-selector.d.tshttps://github.com/NativeScript/NativeScript/pull/7848/files#diff-03bcd9f7b5ec7fbc844b8fe17309f86c1e2a45cb3ab6dd25b65b0bd52909d1c2
View file https://github.com/NativeScript/NativeScript/blob/906bd0d2a5b29e882031e16e7f59111920639530/nativescript-core/ui/styling/css-selector/css-selector.d.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/7848/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-03bcd9f7b5ec7fbc844b8fe17309f86c1e2a45cb3ab6dd25b65b0bd52909d1c2
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-03bcd9f7b5ec7fbc844b8fe17309f86c1e2a45cb3ab6dd25b65b0bd52909d1c2
nativescript-core/ui/styling/css-selector/css-selector.tshttps://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
View file https://github.com/NativeScript/NativeScript/blob/906bd0d2a5b29e882031e16e7f59111920639530/nativescript-core/ui/styling/css-selector/css-selector.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/7848/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-22bd84e3a630e32dab785626d7771714c938a51bf9ba24fe06806f6d113a02d1
nativescript-core/ui/styling/style-scope.tshttps://github.com/NativeScript/NativeScript/pull/7848/files#diff-da4e64b544de41629c8f8b4f1ca32c93c16f4ad07e4dec1f68914c6b49a31d12
View file https://github.com/NativeScript/NativeScript/blob/906bd0d2a5b29e882031e16e7f59111920639530/nativescript-core/ui/styling/style-scope.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/7848/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-da4e64b544de41629c8f8b4f1ca32c93c16f4ad07e4dec1f68914c6b49a31d12
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-da4e64b544de41629c8f8b4f1ca32c93c16f4ad07e4dec1f68914c6b49a31d12
tests/webpack.config.jshttps://github.com/NativeScript/NativeScript/pull/7848/files#diff-6e8810753060620dd6dac533de94d281a23fb4ce32aa58edc727084d4e33e8e2
View file https://github.com/NativeScript/NativeScript/blob/906bd0d2a5b29e882031e16e7f59111920639530/tests/webpack.config.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/NativeScript/pull/7848/{{ revealButtonHref }}
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-6e8810753060620dd6dac533de94d281a23fb4ce32aa58edc727084d4e33e8e2
https://github.com/NativeScript/NativeScript/pull/7848/files#diff-6e8810753060620dd6dac533de94d281a23fb4ce32aa58edc727084d4e33e8e2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.