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

fix(grid,tree-shake): use lightweight token for paginator #13896

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

damyanpetev
Copy link
Member

Added a DI alias for the paginator using a lightweight token and swapped the content queries in the grids to use it instead so the component can be tree-shaken when not in use.
Note, it's not a "by-the-book" lightweight token implementation since the IgxPaginatorComponent still extends DisplayDensityBase and I didn't want to mix that with the token. Instead, left a comment since the density is deprecated and will be dropped eventually. Also, the paginator prop on the grids is still part of the public interface (even as hidden) and I left that with just type imports to avoid propagating the change further and will leave that again for later once the public interface is cleaned up.

Results:
Given the app imports just IgxGridComponent, IgxColumnComponent before and after:
image
Small win, but the correct approach for this type of child component relations nonetheless :)

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@kdinev kdinev added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Feb 13, 2024
Copy link
Member

@kdinev kdinev left a comment

Choose a reason for hiding this comment

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

Please include an CHANGELOG.MD update.

@kdinev kdinev added ✅ status: verified Applies to PRs that have passed manual verification and removed 💥 status: in-test PRs currently being tested labels Feb 13, 2024
@damyanpetev
Copy link
Member Author

Please include an CHANGELOG.MD update.

Will make a 3rd PR for the action strip and will add the changelog there to avoid conflicting with the current 2

@damyanpetev damyanpetev mentioned this pull request Feb 13, 2024
11 tasks
@damyanpetev damyanpetev merged commit 69c0ec8 into master Feb 13, 2024
6 checks passed
@damyanpetev damyanpetev deleted the dpetev/grid-paginator-tree-shake branch February 13, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants