[#9] Avoid frontend-core avatar barrel cycle - #159
Merged
Conversation
Member
Author
Scope assessment for #160The requested change is narrow in source scope, but potentially meaningful for the client bundle:
A complete removal should therefore be limited to:
The main challenges are behavioral rather than architectural:
Recommendation: treat this as a focused |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Avoid importing
UserAvatarthrough the@supertoolmake/frontend-corebarrel from withinfrontend-coreitself. The local import preserves the logged-in user's initials avatar, color, and tooltip behavior while removing the circular package boundary.Bundle size comparison from
yarn buildinpackages/client:budibase-client.js965.09 kB / 119.70 kB gzip; generatedsrcchunks 390.67 kB / 104.58 kB gzip and 1,962.76 kB / 420.10 kB gzip.budibase-client.js964.04 kB / 119.65 kB gzip; generatedsrcchunks 389.49 kB / 104.52 kB gzip and 1,959.97 kB / 419.70 kB gzip.UserAvatar-*.jschunk, so the issue-reported 417.27 kB chunk was not reproducible on this revision.Addresses
App Export
Screenshots
Launchcontrol
Avoids a circular avatar component import so the logged-in user's initials avatar continues to work without unnecessarily importing the frontend-core package barrel.