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

feat(h-grid): provide injector to simplify child toolbar template setup #13907

Merged
merged 7 commits into from
Feb 15, 2024

Conversation

damyanpetev
Copy link
Member

@damyanpetev damyanpetev commented Feb 15, 2024

This allows the definition of child grid toolbar templates without the explicit need to get the grid ref and assign it to the toolbar.
So from:

<igx-row-island>
  <igx-grid-toolbar [grid]="childGrid" *igxGridToolbar="let childGrid">

to

<igx-row-island>
  <igx-grid-toolbar *igxGridToolbar>

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 previously approved these changes Feb 15, 2024
@kdinev kdinev added 💥 status: in-test PRs currently being tested ❌ status: awaiting-test PRs awaiting manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification 💥 status: in-test PRs currently being tested labels Feb 15, 2024
@MayaKirova MayaKirova added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Feb 15, 2024
@MayaKirova
Copy link
Contributor

@damyanpetev LGTM.
I'm just wondering if maybe we should also deprecate/remove the grid property on to the toolbar as a whole. It seems to have been used only for child hierarchical grid, so if we no longer use it might be better to just remove it.
@dkamburov We'll need to update the docs for the next release for the hgrid toolbar for this change: https://www.infragistics.com/products/ignite-ui-angular/angular/components/hierarchicalgrid/toolbar

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

@damyanpetev LGTM. I'm just wondering if maybe we should also deprecate/remove the grid property on to the toolbar as a whole. It seems to have been used only for child hierarchical grid, so if we no longer use it might be better to just remove it. @dkamburov We'll need to update the docs for the next release for the hgrid toolbar for this change: https://www.infragistics.com/products/ignite-ui-angular/angular/components/hierarchicalgrid/toolbar

I think the grid reference can still be useful for other use cases (perhaps custom buttons that call some grid API), so it could be left exposed. Wondering if we should expose it the same way for the paginator, but I digress.
And already on the docs change IgniteUI/igniteui-docfx#5713 :)

dkamburov
dkamburov previously approved these changes Feb 15, 2024
@MayaKirova
Copy link
Contributor

@damyanpetev LGTM. I'm just wondering if maybe we should also deprecate/remove the grid property on to the toolbar as a whole. It seems to have been used only for child hierarchical grid, so if we no longer use it might be better to just remove it. @dkamburov We'll need to update the docs for the next release for the hgrid toolbar for this change: https://www.infragistics.com/products/ignite-ui-angular/angular/components/hierarchicalgrid/toolbar

I think the grid reference can still be useful for other use cases (perhaps custom buttons that call some grid API), so it could be left exposed. Wondering if we should expose it the same way for the paginator, but I digress. And already on the docs change IgniteUI/igniteui-docfx#5713 :)

The directive that holds the grid context can stay. I'm talking about this grid input that is no longer needed: https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar.component.ts#L58

I don't think the toolbar can be used outside of the grid. Since something like this:

    <igx-grid-toolbar [grid]="grid1">
        <igx-grid-toolbar-title>{{ toolbarTitle }}</igx-grid-toolbar-title>
    </igx-grid-toolbar>
    <igx-hierarchical-grid #grid1 ...

Thrown an injection error.

And judging by the api docs around the prop, it was used for the hierarchical grid children only, so maybe it can be removed now.
It can be logged separately of course, it just bugs me that it's there and seems to be useless now.

@damyanpetev damyanpetev dismissed stale reviews from dkamburov and kdinev via bc98090 February 15, 2024 14:36
@kdinev kdinev merged commit dfe3884 into master Feb 15, 2024
5 of 6 checks passed
@kdinev kdinev deleted the dpetev/hgrid-toolbar-template branch February 15, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants