Skip to content

Org Chart/HR Portal sample: tree grid with scoped Fluent theme and templated cells#20

Open
Zneeky wants to merge 9 commits into
aahmedov/erp-inventory-sample-blazorfrom
aahmedov/org-chart-hr-portal-sample
Open

Org Chart/HR Portal sample: tree grid with scoped Fluent theme and templated cells#20
Zneeky wants to merge 9 commits into
aahmedov/erp-inventory-sample-blazorfrom
aahmedov/org-chart-hr-portal-sample

Conversation

@Zneeky

@Zneeky Zneeky commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Closes #5
Implements the Org Chart / HR Portal sample (#5) - a tree grid of the company employee hierarchy, matching the IgniteUI Web Components HR Portal example.

Stacked on the ERP/Inventory sample, so this PR targets aahmedov/erp-inventory-sample-blazor and its diff is only the HR-portal changes.

Highlights

  • IgbTreeGrid with ChildDataKey="Employees" - expand/collapse the org hierarchy (118 employees), with a pinned avatar column, multi-cascade row selection, Excel-style + advanced filtering, sorting with a conditional Clear Sort button, column hiding/pinning, Excel export, and a 20-per-page paginator.
  • Fluent / Light theme, scoped to #fluent-section. (The sample previously had an @import nested inside a selector — invalid CSS — so it was silently falling back to the host Material theme. Now --ig-primary-500 resolves to the Fluent blue #0078d4.)
  • Templated cells (native lit-html): employee avatar + name, country flag + location, and a contact group (mail / tel / LinkedIn) coloured in the Fluent primary. Hire Date renders as ISO yyyy-MM-dd; Gross Salary as currency.

Notes

  • Registered the missing IgbTreeGrid / IgbPaginator / IgbIconButton modules (the tree grid wasn't rendering before).
  • Moved the cell-template script into index.html with the load-order guard (the in-component <script type="module"> never executed under Blazor) and fixed a data.Contacs typo.
  • Columns use MinWidth only (no fixed percentages); the grid auto-distributes the remaining width.

Verification

Built and exercised in the browser: the tree hierarchy expands, all templated cells render (avatars, flags, blue contact icons), ISO dates + currency format correctly, the columns fill the width, and there are no console errors.

Zneeky added 9 commits June 11, 2026 01:03
… templated cells and WC parity

- Register the missing IgbTreeGrid / IgbPaginator / IgbIconButton modules so the tree grid renders.
- Apply the Fluent / Light theme scoped to #fluent-section: the previous nested `@import` inside a
  selector was invalid CSS, so the grid was actually rendering the host Material theme. Generate
  fluent-theme.css by scoping the prebuilt Fluent component + grid theme CSS to #fluent-section,
  and rescope the cell styles to match.
- Load the cell templates from index.html with the load-order guard (the in-component
  `<script type="module">` never executed under Blazor), and fix the contact-template field typo
  (data.Contacs -> data.Contacts).
- Match the Web Components sample: Gross Salary as currency, Hire Date as ISO yyyy-MM-dd via a date
  template, and multipleCascade row selection.
- Remove unused RCL boilerplate.
… contact icons Fluent blue

- Widen the columns (they summed to ~83%, leaving a ~237px empty strip on the right) so the grid
  fills the available width.
- Color the contact icon buttons with the Fluent primary (var(--ig-primary-500)) instead of the
  browser default link blue / dark icon part.
… min-widths

Remove the explicit percentage Width values from the columns and keep only MinWidth, letting the
tree grid auto-distribute the available width (matching the Web Components sample). The columns fill
the grid evenly with no right-side gap.
…header/buttons, match WC grid sizing

Fleet sample:
- Remove the per-column filter row; keep the advanced-filtering toolbar dialog and button.
- Match the WC grid sizing: scope --ig-size-small to the grid (toolbar 44px), set the header
  sort icon to 15px (the grid otherwise renders it at the default 24px), row height to 32px, and
  use MinWidth-only columns (drop the percentage widths so they auto-distribute and fill the grid).
- Make the grid flush by dropping the .fleet-container 1rem padding.
- Match the WC toolbar title exactly: soft-gray #e0e0e0 (was near-white #fafafa) and left-aligned
  at the toolbar padding (hide the empty portaled title slot that pushed it ~16px right).

App shell (NavMenu):
- Re-render the nav on navigation (subscribe to NavigationManager.LocationChanged) so the active
  tab and the current-tab-info no longer go stale after switching samples.
- Use the exact per-sample title/description/theme/mode from the WC home view (fixes ERP and Sales,
  which were defaulting to the Bootstrap theme label).
- Fix the Download and Fullscreen buttons: IgbButton (Lite) exposes no click event, so wrap each in
  a span with @OnClick and add shell-interop.js (real document fullscreen; Download fetches the repo
  zip; View More opens the docs in a new tab).
…blazor' into aahmedov/org-chart-hr-portal-sample
…blazor' into aahmedov/org-chart-hr-portal-sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant