Skip to content
Snippets Groups Projects

Remove automatic filling of node label and fallback on id

Merged Loic Huder requested to merge remove-node-label into main
4 unresolved threads

Follow-up of !387 (merged)

Since I added a test for this, I also rewritten most of the tests in nodes.cy.ts. They can all be run in isolation.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
20 16 cy.get('.react-flow').contains('Always and forever...').should('be.visible');
21 17 });
22 18
19 it('fallbacks on id when there is no label', () => {
20 cy.findByRole('textbox', { name: 'Edit label' }).click().clear();
21
22 cy.get('@node').within(() => {
23 cy.contains('taskSkeleton0');
24 });
25 });
  • 8 function DataNode(args: NodeProps) {
    9 const nodeData = useNodeDataStore((state) => state.nodesData.get(args.id));
    10 assertNodeDataDefined(nodeData, args.id);
    8 function DataNode(props: NodeProps) {
    9 const nodeData = useNodeDataStore((state) => state.nodesData.get(props.id));
    10 assertNodeDataDefined(nodeData, props.id);
    11 11
    12 12 const uiProps = nodeData.ui_props;
    13 13
    14 14 return (
    15 15 <Node
    16 id={args.id}
    16 id={props.id}
    17 17 type={nodeData.task_props.task_type}
    18 label={nodeData.ewoks_props.label || ''}
    18 label={nodeData.ewoks_props.label || props.id}
  • 54 54 type: task_type,
    55 55 data: {
    56 56 ewoks_props: {
    57 label: label ?? task_identifier,
    57 label,
  • 1 1 {
    2 2 "graph": {
    3 "id": "workflow2"
    3 "id": "workflow2",
    4 "label": "workflow2"
  • Loic Huder requested review from @bocciare

    requested review from @bocciare

  • Sorry @bocciare , I went a bit overboard with the changes. I can break them down in separate commits if you find it hard to read.

    Edited by Loic Huder
  • Axel Bocciarelli approved this merge request

    approved this merge request

  • Loic Huder mentioned in commit fe81f443

    mentioned in commit fe81f443

  • merged

  • Please register or sign in to reply
    Loading