TaskGrid Enhancements#37
Merged
Merged
Conversation
…th templating support
- Updated package.json to use local client libraries. - Enhanced GridCustomizer to include column mapping. - Improved MultiRecordSelector with new state management for default options and rendering. - Introduced LookupMany component for handling multiple record selections. - Created reusable components for multi-value handling (MultiValueContainer, MultiValueLabel, MultiValueRemove). - Added styles for new components to ensure consistent UI. - Implemented option rendering with custom styles in LookupMany and MultiRecordSelector. - Added support for navigation in multi-value labels.
… customizable styles
…tyles and context support
…TagLookupMany styles
…nt and update related styles
…vider extensions - Added LexoRank class for generating lexicographical ranks between tasks. - Introduced DataProviderStrategy for handling task data in Dataverse. - Created Descriptor class for managing task grid configurations and saved queries. - Developed GridCustomizer for customizing grid behavior and rendering. - Implemented ProjectDataProvider for fetching project records. - Added LookupManyHandler for managing lookup-many relationships in tasks. - Created cell renderer components for rendering lookup-many fields in the grid. - Established FetchXmlDataProviderFactory for dynamic FetchXml generation.
… removing unused methods and enhancing form parameter handling
…expansion logic, and update LookupMany placeholder handling
- Enhanced descriptions for task management features and component usage. - Updated the example code to utilize the built-in Descriptor from the Dataverse extension. - Clarified the descriptor interface and its methods with detailed explanations. - Improved formatting and consistency throughout the documentation. - Added notes on localization and UI component replacement.
…te on Dataverse strategy for task ordering
… related references
…date related references
…ith current query
…tes and clarify usage
… related references
…askGridDescriptor and DataverseTaskStrategy for improved functionality
…d refactor related functionalities
…content visibility logic
…e related event handling
…ve percent complete rendering
…references and task entity flag
…g, filtering, and row height parameters
…ion logic from metadata parsing
…structure for task and project
…eight parameters; add new methods for custom columns and record tree management
…nterface and improve query processing logic
…rity in Dataverse strategies
…Liquid variable descriptions
…son and package-lock.json
Contributor
There was a problem hiding this comment.
Pull request overview
This PR significantly evolves the TaskGrid control by restructuring provider modules, introducing a Dataverse “extensions” implementation (descriptor + strategies), and adding new LookupMany column capabilities, alongside several shared Grid/UI fixes and localization refactoring.
Changes:
- Added a reusable
LocalizationServiceutility (Liquid-enabled) and switched TaskGrid to consume it fromsrc/utils. - Restructured TaskGrid internals from
data-providers/→providers/, updated key interfaces (INativeColumns→IFieldMapping, strategy API changes), and moved quick-find configuration intoISavedQuery.quickFindColumns. - Introduced
extensions/dataverse/with Dataverse-ready descriptor/strategies plus LookupMany infrastructure (cell renderers, relationship handler), and added LexoRank ordering support.
Reviewed changes
Copilot reviewed 97 out of 101 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/localization/LocalizationService.ts | New shared localization service (Liquid interpolation). |
| src/utils/localization/index.ts | Barrel export for localization utilities. |
| src/utils/index.ts | Re-exports localization utilities from utils. |
| src/components/TaskGrid/TaskGridDatasetControlFactory.ts | Updates imports to new providers structure and wires new deps/flags into strategies/providers. |
| src/components/TaskGrid/TaskGridDatasetControl.ts | Updates parameter defaults to false, adds new feature flag accessors, and adjusts saved-query/task event wiring. |
| src/components/TaskGrid/TaskGrid.tsx | Uses shared LocalizationService and updated descriptor hooks (height, license key). |
| src/components/TaskGrid/README.md | Major rewrite documenting new APIs, Dataverse extension, and LookupMany. |
| src/components/TaskGrid/providers/task/TaskDataProvider.ts | Renames/edit flow to dataset-item open, adds saved-query/custom-columns integration, and quick-find via saved query. |
| src/components/TaskGrid/providers/task/record-tree/RecordTree.ts | Adds a guard around path patching when the path column isn’t present. |
| src/components/TaskGrid/providers/task/record-tree/patchDataBuilderPrepare.ts | New patch helper to override memory provider DataBuilder prepare behavior. |
| src/components/TaskGrid/providers/task/record-tree/index.ts | Barrel export for record-tree. |
| src/components/TaskGrid/providers/task/index.ts | Barrel export for task provider. |
| src/components/TaskGrid/providers/saved-query/SavedQueryDataProvider.ts | Adds quickFindColumns, introduces virtual path column handling, and enriches saved query metadata from system/custom columns. |
| src/components/TaskGrid/providers/saved-query/index.ts | Barrel export for saved-query provider. |
| src/components/TaskGrid/providers/index.ts | Barrel export for all TaskGrid providers. |
| src/components/TaskGrid/providers/custom-columns/index.ts | Barrel export for custom-columns provider. |
| src/components/TaskGrid/providers/custom-columns/CustomColumnsDataProvider.ts | Extends custom columns strategy contract to support value persistence and raw record retrieval. |
| src/components/TaskGrid/labels.ts | Removes embedded localization service, adds new path label, keeps label map. |
| src/components/TaskGrid/interfaces.ts | Renames INativeColumns → IFieldMapping, updates strategy and feature flag interfaces, and changes defaults to false. |
| src/components/TaskGrid/extensions/dataverse/lookup-many/LookupManyHandler.ts | New handler for Dataverse lookup-many relationship metadata + associate/disassociate. |
| src/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlLookupManyCellRenderer.tsx | New FetchXml-driven lookup-many cell renderer for Dataverse. |
| src/components/TaskGrid/extensions/dataverse/lookup-many/cell-renderer/FetchXmlDataProviderFactory.ts | Liquid-enabled factory to create FetchXml data providers with injected variables. |
| src/components/TaskGrid/extensions/dataverse/index.ts | Barrel export for Dataverse extensions subtree. |
| src/components/TaskGrid/extensions/dataverse/DataverseTaskStrategy.ts | New Dataverse task strategy with LexoRank ordering, lookup-many, and custom column integration. |
| src/components/TaskGrid/extensions/dataverse/DataverseTaskGridDescriptor.ts | New Dataverse descriptor that wires saved-query/task/custom-columns/grid-customizer strategies via async initialization. |
| src/components/TaskGrid/extensions/dataverse/DataverseSavedQueryStrategy.ts | New Dataverse saved-query strategy using Liquid FetchXml and talxis_userquery persistence. |
| src/components/TaskGrid/extensions/dataverse/DataverseGridCustomizerStrategy.ts | New grid customizer to auto-wire lookup-many cell renderers based on column metadata. |
| src/components/TaskGrid/extensions/dataverse/DataverseCustomColumnsStrategy.ts | Dataverse custom columns WIP strategy refactor with value upsert and expand helpers. |
| src/components/TaskGrid/data-providers/saved-query-data-provider/index.ts | Removes old saved-query data-provider exports (deprecated path). |
| src/components/TaskGrid/data-providers/index.ts | Removes old data-providers barrel export (deprecated path). |
| src/components/TaskGrid/data-providers/custom-columns-data-provider/index.ts | Removes old custom-columns data-provider exports (deprecated path). |
| src/components/TaskGrid/context.ts | Updates contexts to use ILocalizationService and new provider import paths. |
| src/components/TaskGrid/components/header/view-switcher/view-manager/ViewManager.ts | Updates imports to new saved-query provider and shared localization service. |
| src/components/TaskGrid/components/header/view-switcher/create-view-dialog/CreateViewDialog.tsx | Updates import path to new providers barrel. |
| src/components/TaskGrid/components/header/Header.tsx | Reworks ribbon item composition around new feature flags and open-dataset-items flow. |
| src/components/TaskGrid/components/header/edit-columns/EditColumns.tsx | Updates import path to new providers barrel. |
| src/components/TaskGrid/components/grid/multi-record-selector/styles.ts | Extracts react-select styles into a shared helper. |
| src/components/TaskGrid/components/grid/multi-record-selector/MultiRecordSelector.tsx | Adds navigation hook, custom multi-value components, and default-options behavior. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/option/styles.ts | New styling helper for option rendering. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/option/Option.tsx | New option component for multi-record selector. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/styles.ts | New styling for removable chips. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-remove/MultiValueRemove.tsx | New remove chip component with disabled handling. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/styles.ts | New styling helper for multi-value labels. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-label/MultiValueLabel.tsx | New multi-value label rendering (link + optional navigation). |
| src/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/styles.ts | New styling helper for multi-value containers. |
| src/components/TaskGrid/components/grid/multi-record-selector/components/multi-value-container/MultiValueContainer.tsx | New multi-value container component. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/PeopleLookupMany.tsx | Adds PeopleLookupMany variant atop LookupMany. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/index.ts | Barrel export for PeopleLookupMany. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/context.ts | Context for PeopleLookupMany props. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/styles.ts | Styles for PeopleLookupMany option rendering. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/Option.tsx | Option renderer showing persona/avatar. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/option/index.ts | Barrel export for people option. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/styles.ts | Styles for people multi-value label. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/MultiValueLabel.tsx | People-style multi-value label (persona + tooltip). |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-label/index.ts | Barrel export for people multi-value label. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/styles.ts | Styles override for people chip container (disabled mode). |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/MultiValueContainer.tsx | People chip container wrapper. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/multi-value-container/index.ts | Barrel export for people chip container. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/index.ts | Barrel export for people components. |
| src/components/TaskGrid/components/grid/lookup-many/people-lookup-many/components/components.tsx | Default people LookupMany component overrides. |
| src/components/TaskGrid/components/grid/lookup-many/LookupMany.tsx | New base LookupMany picker (async select + lazy default option loading). |
| src/components/TaskGrid/components/grid/lookup-many/index.ts | Barrel export for lookup-many plus re-export of react-select types. |
| src/components/TaskGrid/components/grid/lookup-many/context.ts | Context for base LookupMany props. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/styles.ts | Styles for remove chip for LookupMany. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-remove/MultiValueRemove.tsx | Remove chip component for LookupMany. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/styles.ts | Styles for LookupMany multi-value label. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/MultiValueLabel.tsx | LookupMany multi-value label with optional navigation. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-label/index.ts | Barrel export for lookup-many multi-value label. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/styles.ts | Styles for LookupMany multi-value container. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/MultiValueContainer.tsx | LookupMany chip container with optional className composition. |
| src/components/TaskGrid/components/grid/lookup-many/components/multi-value-container/index.ts | Barrel export for lookup-many chip container. |
| src/components/TaskGrid/components/grid/lookup-many/components/menu/Menu.tsx | Menu wrapper applying Fluent theme provider. |
| src/components/TaskGrid/components/grid/lookup-many/components/menu/index.ts | Barrel export for menu. |
| src/components/TaskGrid/components/grid/lookup-many/components/index.ts | Barrel export for lookup-many components. |
| src/components/TaskGrid/components/grid/lookup-many/components/components.tsx | Default component wiring for LookupMany (AsyncSelect + slots). |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/index.ts | Barrel export for ColorfulLookupMany. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/context.ts | Context for ColorfulLookupMany props. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/styles.ts | Styles for colored-dot option display. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/Option.tsx | Colored option renderer. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/option/index.ts | Barrel export for colorful option. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/MultiValueContainer.tsx | Chip container that applies a generated theme based on tag color. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/multi-value-container/index.ts | Barrel export for colorful chip container. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/components/index.tsx | Default colorful LookupMany component overrides. |
| src/components/TaskGrid/components/grid/lookup-many/colorful-lookup-many/ColorfulLookupMany.tsx | ColorfulLookupMany variant atop LookupMany. |
| src/components/TaskGrid/components/grid/group-cell/styles.ts | Adds font-weight styling for react-select value container content. |
| src/components/TaskGrid/components/grid/grid-drag-handler/GridDragHandler.ts | Updates imports to new task provider path. |
| src/components/TaskGrid/components/grid/grid-customizer/GridCustomizer.ts | Adds inline-create editing focus behavior, lookup renderer wiring via controls metadata, and tweaks group open + add-task injection behavior. |
| src/components/TaskGrid/components/grid/cell-renderers/percent-complete/styles.ts | Removes CSS-based percent suffix styling. |
| src/components/TaskGrid/components/grid/cell-renderers/percent-complete/PercentComplete.tsx | Makes control name explicit and formats percent in code. |
| src/components/TaskGrid/components/grid/cell-renderers/lookup-many/LookupManyCellRenderer.tsx | New grid-level renderer integrating LookupMany pickers and navigation/edit mode. |
| src/components/TaskGrid/components/grid/cell-renderers/lookup-many/index.ts | Barrel export for lookup-many cell renderer. |
| src/components/TaskGrid/components/grid/cell-renderers/add-task-button/AddTaskButton.tsx | Switches enablement to dataset-control flags and adjusts click/menu behavior. |
| src/components/Lookup/translations.ts | Adds localized fallback for “Record”. |
| src/components/Lookup/Lookup.tsx | Uses fallback “Record” when display name is missing. |
| src/components/Grid/grid/ag-grid/AgGridModel.ts | Ensures cell editability respects both column.isEditable and security editable. |
| src/components/Grid/column-headers/column-header/ColumnHeader.tsx | Uses column.canBeGrouped rather than metadata flag. |
| src/components/Grid/cells/cell/Cell.tsx | Stops blocking click bubbling in grouped/selected rows. |
| src/components/DatasetControl/EditColumns/OptionText/OptionText.tsx | Replaces Fluent <Text> with <span> to avoid heavy dependency. |
| rollup.config.js | Adds lexorank to external deps list. |
| package.json | Bumps Talxis deps and adds lexorank. |
| package-lock.json | Locks updated dependency graph including lexorank. |
Comments suppressed due to low confidence (2)
src/components/TaskGrid/TaskGrid.tsx:43
localizationServiceis memoized with an empty dependency array and the dataset-control instance is only created once on mount, so updates toprops.labels(or swapping descriptors) will not propagate to providers/strategies and the grid can keep stale labels. Recompute the service when labels change and recreate the instance when the service/descriptor changes.
const localizationService = React.useMemo(() => new LocalizationService({ ...TASK_GRID_LABELS, ...props.labels }), []);
const [instanceState, setInstanceState] = React.useState<{
instance: ITaskGridDatasetControl;
remountKey: number;
src/components/TaskGrid/providers/task/TaskDataProvider.ts:309
onOpenDatasetItemstartsErrorHelper.executeWithErrorHandling(...)but neitherawaits norreturns it. Because the method itself isasync, callers will observe it as completed immediately and any errors/results happen out-of-band (and can become unhandled ifexecuteWithErrorHandlingrejects). Return the promise (orawaitit) so the async contract is respected.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+263
to
+271
| const metadata = this._fetchXmlDataProvider.getMetadata(); | ||
| const fetchXmlProviderData = this._fetchXmlDataProvider.getRawData(); | ||
| const enrichedData = await this.onGetRawRecords(this._fetchXmlDataProvider.getSortedRecordIds(), this._fetchXmlDataProvider.getMetadata().PrimaryIdAttribute); | ||
| const finalRawData = fetchXmlProviderData.map((record, i) => { | ||
| return { | ||
| ...enrichedData[i], | ||
| ...record, | ||
| } | ||
| }); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…sed enableUserQueries property
…DataverseTaskGridDescriptor
Replaced index-based array alignment with a Map<id, record> lookup to ensure lookup-many values are merged onto the correct task record regardless of OData response ordering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
TaskGrid Enhancements
This PR brings a major round of TaskGrid improvements, a new Dataverse extensions subtree, and several shared component fixes.
ITaskDataProviderStrategy— removed methodsonOpenDatasetItem(entityReference, context?)onOpenDatasetItems(entityReferences, isTaskEntity)— now receives an array and a boolean flag indicating whether the references are task records or related entity recordsonEditTasks(taskIds)onOpenDatasetItemswithisTaskEntity: trueonGetQuickFindColumns()ISavedQuery.quickFindColumns)INativeColumns→IFieldMappingINativeColumnshas been renamed toIFieldMapping. Update all imports and usages accordingly. TheITaskGridDescriptor.onGetNativeColumns()method has been renamed toonGetFieldMapping().Import paths changed
All internal data providers have moved. Update any direct imports:
.../TaskGrid/data-providers.../TaskGrid/providers.../TaskGrid/data-providers/saved-query-data-provider.../TaskGrid/providers/saved-query.../TaskGrid/data-providers/task-data-provider.../TaskGrid/providers/task.../TaskGrid/data-providers/custom-columns-data-provider.../TaskGrid/providers/custom-columnsDataverse classes renamed
These classes existed in
data-providers/and have been renamed and moved toextensions/dataverse/:TalxisSavedQueryDataProviderDataverseSavedQueryStrategyTalxisCustomColumnsDataProviderStrategyDataverseCustomColumnsStrategyITaskGridParameters— all flags default tofalsePreviously all flags defaulted to
truewhenonGetGridParameterswas omitted. They now default tofalse. Explicitly set the flags you need.LocalizationServiceContext— type narrowedThe context type changed from
LocalizationService<ITaskGridLabels>toILocalizationService<ITaskGridLabels>.New: LookupMany columns
A new column type that surfaces a multi-value relationship (1:N or N:N) directly as a grid cell with an inline multi-record picker.
LookupMany— generic multi-record pickerColorfulLookupMany— picker with colored badge chips (driven by aColorPropertyNamebinding)PeopleLookupMany— people-style avatar picker (driven by anImageUrlPropertyNamebinding)MultiRecordSelector— shared base picker component used by all three variantsLookupManyCellRenderer— AG Grid cell renderer that wraps the pickersmetadata.LookupMany.ReferencedEntityNavigationPropertyName; theFetchXmlbinding supports Liquid variables{{ task.* }}and{{ project.* }}New: Dataverse extensions subtree (
extensions/dataverse/)Ready-to-use implementations of all TaskGrid strategy interfaces for the Dataverse / Talxis platform:
DataverseTaskGridDescriptorITaskGridDescriptor— wires all strategies from a singleonInitializeasync params objectDataverseTaskStrategyITaskDataProviderStrategyagainst the Xrm Web API and FetchXML, with LexoRank ordering and lookup-many supportDataverseSavedQueryStrategyISavedQueryStrategythat persists user views astalxis_userqueryrecordsDataverseCustomColumnsStrategyICustomColumnsStrategybacked bytalxis_attributedefinition/talxis_attributevalueDataverseGridCustomizerStrategyIGridCustomizerStrategythat auto-wires lookup-many cell renderersLookupManyHandlerLexoRank ordering
Added
lexorankas a dependency. The Dataverse strategy uses LexoRank strings for thestackRankattribute, enabling stable drag-and-drop reordering without integer gaps.Provider restructure
All internal data providers moved from
data-providers/→providers/for a cleaner structure:providers/task/—TaskDataProvider,RecordTreeproviders/saved-query/—SavedQueryDataProviderproviders/custom-columns/—CustomColumnsDataProviderBug fixes & minor improvements
AgGridModel: Cell editable state now correctly respectscolumn.isEditablein addition to security editable flagColumnHeader: Usescolumn.canBeGroupedinstead ofcolumn.metadata?.CanBeGroupedCell: Removede.stopPropagation()calls that were blocking click event bubbling on grouped/selected rowsLookup: Graceful fallback to localized "Record" string whenDisplayNameis undefinedOptionText: Replaced<Text>(Fluent UI) with<span>to remove the heavy dependency for a simple wrapperDependencies
@talxis/client-libraries:1.2605.1→1.2606.1@talxis/client-metadata:^0.0.3→^0.0.4lexorank ^1.0.5Documentation
TaskGrid/README.mdfully rewritten: updated constructor patterns, corrected all interface reference tables, added LookupMany section with correctmetadata.LookupManyshape and Liquid variable reference