-
Notifications
You must be signed in to change notification settings - Fork 0
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: use metadata manager provider APIs v2 around #927
feat: use metadata manager provider APIs v2 around #927
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @davidlj95 and the rest of your teammates on |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #927 +/- ##
==========================================
- Coverage 98.16% 97.34% -0.83%
==========================================
Files 85 87 +2
Lines 382 376 -6
Branches 70 61 -9
==========================================
- Hits 375 366 -9
- Misses 3 6 +3
Partials 4 4 ☔ View full report in Codecov by Sentry. |
📦 Bundle size (Angular v17)Git ref:
|
📦 Bundle size (Angular v15)Git ref:
|
📦 Bundle size (Angular v18)Git ref:
|
📦 Bundle size (Angular v16)Git ref:
|
1c48014
to
e02ec1d
Compare
d7a62a1
to
f81740a
Compare
3b959cc
to
d27fae4
Compare
104e18b
to
2685d8e
Compare
8cc3a37
to
e2de376
Compare
2685d8e
to
358de85
Compare
e2de376
to
bdf0527
Compare
33b5d27
to
90d6cf9
Compare
90d6cf9
to
cfb67a3
Compare
a57df95
to
25cbb5f
Compare
🎉 This PR is included in version 1.0.0-beta.22 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue or need
New APIs (v2) were introduced to provide metadata managers in #926
Proposed changes
Let's start using them around for the built-in metadata modules
Some internal APIs have been added to create a metadata manager that belongs to a set of metadata values. Like the ones for built-in modules: Open Graph, standard...
Where
key
is the key of the object of metadata values that can be set to provide a manager for.This helper allows abstracting logic for all those kind of modules:
<meta>
element with same nameurl
isopenGraph
scope in the JSON of metadata values (keys to access the module's JSON of values), with theurl
key in that object. Scope can be multiple keys like in Open Graph profile, underopenGraph
profileNgxMetaElementsService
as dependency (for previous point)Those above are also customized further by every module. For instance, Open Graph sets a custom scope and property attribute to use by default.
The implementation has gone through several rounds of optimizations to improve uncompressed bundle size:
Following bundle size optimizations were thought of, but weren't performed:
string
. Avoids the utility to convert to it (plus then having to split it back). But nothing much else. Would save 10 bytes. But having first argument as a string is more developer friendly. Worth those 10 bytes.withX
APIs. It would save 45 bytes of defining them. But eventually just shave 20 bytes of the bundle size. Code is more expressive this way. Worth 20 bytes.Docs have been updated: custom metadata manager guide.
APIs from #926 are now marked as public. Changing scope to
feat
Quick reminders