Repository navigation
Conversation
A "Join" toggle next to the dataset title opens a section to pick a reference table (dataset title, table name as subtitle), the source and reference join keys, then the columns to add. Changing the table resets the reference key and the added columns. The toggle shows a marker while columns are added. The join is saved in the transformation only once a column is added. Joined columns are shown read-only and in green after the source columns of the preview, which scrolls to the right on each addition. A joined column named like an output column of the preview is flagged like a duplicate rename: it blocks validation and is left out of the saved join. As in the backend, excluded columns do not count, and geom is taken when the point is built from X/Y. Failing to load the joinable tables or columns shows an error above the step. The wizard now renders a single preview table instead of one per geographic branch, so adding a joined geom no longer recreates it. GSMEL-1223
f7abe10 to
6539491
Compare
tkohr
left a comment
There was a problem hiding this comment.
Thanks @tonio, nice feature with clear UX ! The code LGTM, just left some minor comments inline.
Works mostly flawless, the only things I noticed testing:
- Couldn't change the column name of a column with a naming conflict as the input is not editable (see screenshot below)
- Keyboard arrow navigation on dataset selection does not seem to work
- Our gn-ui dropdowns do not seem to support selecting an option by typing its value, which can be practical in long lists (not related to this PR though)
| <gn-ui-button | ||
| data-test="join-toggle" | ||
| type="outline" | ||
| extraClass="h-14" |
There was a problem hiding this comment.
Could also be achieved via the css var approach I think:
| extraClass="h-14" | |
| [style.--gn-ui-button-height]="'3.5rem'" |
| this.saveConfigAndRefresh() | ||
| } | ||
|
|
||
| async toggleJoin(): Promise<void> { |
There was a problem hiding this comment.
I've noticed that there is a lot of join logic in the wizard component now and was wondering if there'd be a way to move some of it out of there!?
| <gn-ui-button | ||
| data-table-select | ||
| type="outline" | ||
| extraClass="bg-background flex flex-row w-full" |
There was a problem hiding this comment.
Could probably also be achieved in the style binding if it's not already part of the gn-ui-button style.
| } | ||
| </div> | ||
|
|
||
| <ng-template |
There was a problem hiding this comment.
Why don't we use a gn-ui-dropdown-selector for the first dropdown? I've noticed that I can't navigate with the keyboard arrows in this one.
GSMEL-1223: define a join in the preview step
Based on #185 (backend: join config, LEFT JOIN in preview, joinable tables/columns endpoints). Merge that one first.
What
Rules
geomis taken when the point is built from X/Y.Notes
geomno longer recreates it and loses the scroll.app-dataset-titleto stay aligned with the title field, with or without a validation error.Test
geom. The preview fills the green columns and the map tab becomes available.