This repository was archived by the owner on Aug 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 552
Fiori Tree Views towards GA #839
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d9d6391
Fiori Tree Views towards GA
danjoa d46956d
Also automate addition of Aggregation.RecursiveHierarchy
danjoa b5b1e56
Merged main into current
danjoa ecef6b1
Cleanup models for Genres Tree View
danjoa 332e6d4
Implementing @hierarchy shortcut
danjoa fd6c4c9
.
danjoa 84b3e2d
Formatting
danjoa e880ed0
Using verbose config
danjoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| /* | ||
| All annotations needed for UI5 Tree Table View are located in '../common' | ||
| All annotations needed for UI5 Tree Table View are located in '../common' | ||
| REVISIT: Why? | ||
| */ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // PoC for simplified Fiori Tree Views | ||
| const cds = require('@sap/cds/lib') | ||
|
|
||
| cds.on('compile.to.edmx', csn => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if we replace that by a simplified shortcut, e.g. like that: annotate AdminService.Genres with @Fiori.TreeView #GenreHierarchy .via: parent;
annotate AdminService.Genres with @Fiori.TreeView #GenreHierarchy { via: parent };If there's only one Association to self: annotate AdminService.Genres with @Fiori.TreeView #GenreHierarchy;
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CoPilot just did that for me in d46956d |
||
| const { 'AdminService.Genres': Genres } = csn.definitions | ||
|
|
||
| Genres['@Hierarchy.RecursiveHierarchy#GenreHierarchy.$Type'] = 'Hierarchy.RecursiveHierarchyType' | ||
| Genres['@Hierarchy.RecursiveHierarchy#GenreHierarchy.LimitedDescendantCount'] = {'=':'LimitedDescendantCount'} | ||
| Genres['@Hierarchy.RecursiveHierarchy#GenreHierarchy.DistanceFromRoot'] = {'=':'DistanceFromRoot'} | ||
| Genres['@Hierarchy.RecursiveHierarchy#GenreHierarchy.DrillState'] = {'=':'DrillState'} | ||
| Genres['@Hierarchy.RecursiveHierarchy#GenreHierarchy.LimitedRank'] = {'=':'LimitedRank'} | ||
|
|
||
| Genres['@Aggregation.RecursiveHierarchy#GenreHierarchy.$Type'] = 'Aggregation.RecursiveHierarchyType' | ||
| Genres['@Aggregation.RecursiveHierarchy#GenreHierarchy.NodeProperty'] = {'=':'ID'} | ||
| Genres['@Aggregation.RecursiveHierarchy#GenreHierarchy.ParentNavigationProperty'] = {'=':'parent'} | ||
| }) | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I also tried changing
Int64types toInt16as discussed → seems to work end-to-end for Fiori clients.