Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cleanup for dynamic tasks refactoring #76

Merged
merged 10 commits into from
Jun 29, 2020

Conversation

schottra
Copy link
Contributor

This is a general cleanup PR for leftover small tasks related to our Dynamic Tasks refactor. The bulk of the work is:

  • Styling logic updates to NodeExecutionsTable and its children.
  • Getting the stories for NodeExecutionsTable functional again.

Detailed breakdown:

  • Refactored classes/containers for NodeExecutionRow and NodeExecutionChildren to better support dynamic left spacing based on nesting level.
  • Added props for level and index to row components
  • Added logic to adjust left padding/margin for rows to accomplish the spacing/border scheme shown in the screenshot below
  • Fixed styling on child group labels to render them with padding and thicker top/bottom borders
  • Fixed a few direct usages of api calls without apiContext which were causing real network requests in the storybook environment.
  • Updated/simplified the logic used in the stories to support nested NodeExecutionChildren cases for both single and multiple groups.
  • Updated our processing of workflow closures to also extract nodes from sub-workflows. We don't currently show the hierarchical relationship correctly (see this issue). But we at least want to render the correct node information in the table.
  • General code cleanup

image

@codecov-commenter
Copy link

Codecov Report

Merging #76 into dynamic-task-updates will increase coverage by 0.32%.
The diff coverage is 81.81%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##           dynamic-task-updates      #76      +/-   ##
========================================================
+ Coverage                 61.99%   62.32%   +0.32%     
========================================================
  Files                       359      359              
  Lines                      5607     5624      +17     
  Branches                    830      837       +7     
========================================================
+ Hits                       3476     3505      +29     
+ Misses                     2131     2119      -12     
Impacted Files Coverage Δ
...ents/Executions/Tables/WorkflowExecutionsTable.tsx 31.81% <ø> (ø)
src/models/Common/types.ts 100.00% <ø> (ø)
...onents/Executions/Tables/NodeExecutionChildren.tsx 40.00% <33.33%> (+1.11%) ⬆️
src/components/hooks/useNodeExecution.ts 33.33% <33.33%> (-6.67%) ⬇️
.../components/Executions/Tables/NodeExecutionRow.tsx 91.11% <100.00%> (+3.93%) ⬆️
...mponents/Executions/Tables/NodeExecutionsTable.tsx 93.10% <100.00%> (ø)
src/components/Executions/Tables/styles.ts 100.00% <100.00%> (ø)
src/components/Executions/Tables/utils.ts 29.41% <100.00%> (+29.41%) ⬆️
src/components/Executions/utils.ts 73.78% <100.00%> (ø)
src/components/hooks/utils.ts 100.00% <100.00%> (+20.00%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2120f77...6551c09. Read the comment docs.

@schottra schottra merged commit 04da42d into dynamic-task-updates Jun 29, 2020
@schottra schottra deleted the dynamic-tasks-cleanup branch June 29, 2020 18:29
schottra added a commit that referenced this pull request Jun 29, 2020
* test: creating dynamic task cases for NodeExecutionsTable stories

* fix: styling for child group labels

* fix: mock api context for NodeExecutionsTable stories

* test: mock nodeExecutionData endpoint

* chore: remove unused imports

* fix: extract nodes from subworkflows as well

* fix: adjust borders to make child groups more obvious

* refactor: checkpoint for getting the nesting styles correct

* refactor: adding logic for borders/spacing based on nesting/index

* fix: correct workflow execution table row styles
schottra added a commit that referenced this pull request Jun 30, 2020
* test: creating dynamic task cases for NodeExecutionsTable stories

* fix: styling for child group labels

* fix: mock api context for NodeExecutionsTable stories

* test: mock nodeExecutionData endpoint

* chore: remove unused imports

* fix: extract nodes from subworkflows as well

* fix: adjust borders to make child groups more obvious

* refactor: checkpoint for getting the nesting styles correct

* refactor: adding logic for borders/spacing based on nesting/index

* fix: correct workflow execution table row styles
schottra added a commit that referenced this pull request Jun 30, 2020
* feat: adds more identifying information for node executions (#70)

* feat: show workflow node name beneath node execution ids

* feat: updating DetailsPanel info for NodeExecutions

* fix lint errors

* adding tests for new formatter function

* test: adding new test for NodeExecutionDetails

* test: adding test for new code in NodeExecutionsTable

* refactor: fetch child node executions for NodeExecution rows (#72)

* refactor: fetch child node executions to determine expandability

* fix: handling detection of children for sub-workflows as well

* fix: poor performance with object-hash on some identifiers

* docs: cleanup and docs for newly exposed functions

* test: ensure request config is used for all levels

* chore: remove unused import

* feat: Remove intermediate NodeExecutionsTable row content (#75)

* refactor: removing specialized rows and rendering only nodes

* refactor: moving contexts up to common folder

* refactor: use a data cache for nested node mapping

* refactor: update loading of workflow data

* fix: update usage of NodeExecutions in graph tab

* fix: update TaskExecutionDetails to use data cache

* fix: getting tests and stories working again

* chore: docs and cleanup

* test: use a more robust element query

* refactor: use filter instead of reduce

* docs: adding some missing function docs

* fix: cleanup for dynamic tasks refactoring (#76)

* test: creating dynamic task cases for NodeExecutionsTable stories

* fix: styling for child group labels

* fix: mock api context for NodeExecutionsTable stories

* test: mock nodeExecutionData endpoint

* chore: remove unused imports

* fix: extract nodes from subworkflows as well

* fix: adjust borders to make child groups more obvious

* refactor: checkpoint for getting the nesting styles correct

* refactor: adding logic for borders/spacing based on nesting/index

* fix: correct workflow execution table row styles
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.

3 participants