-
Notifications
You must be signed in to change notification settings - Fork 146
Workflows Table Row Density #3285
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
873b891
Add table-compact and table-comfy icons for table density toggle
Alex-Tideman 7d3bcf2
Export truncate value and truncate custom sa keywords/text
Alex-Tideman 2d185ae
Use dense not compact
Alex-Tideman eb80116
Merge branch 'main' into workflows-row-compact
Alex-Tideman 3e3df40
Remove rounded corners from table-dense and table-comfy icons
Alex-Tideman 02595b2
Truncate more fields, exand the truncateValue to include 6 chars on e…
Alex-Tideman 105732d
Merge branch 'main' into workflows-row-compact
Alex-Tideman ffb8faf
Fix truncate issue with filter/copy buttons, use truncateValue for wo…
Alex-Tideman ccb427e
Truncate to 7 characts, make copy/filter buttons w-6 instead of w-7 t…
Alex-Tideman 3638466
PR review updates
Alex-Tideman 873e969
Change to dense instead of compact
Alex-Tideman ad9b314
Hide tooltip on all other cells if length is less than TRUNCATE_LENGTH
Alex-Tideman 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 |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| import TableEmptyState from '$lib/components/workflow/workflows-summary-configurable-table/table-empty-state.svelte'; | ||
| import Button from '$lib/holocene/button.svelte'; | ||
| import FeatureTag from '$lib/holocene/feature-tag.svelte'; | ||
| import Icon from '$lib/holocene/icon/icon.svelte'; | ||
| import PaginatedTable from '$lib/holocene/table/paginated-table/api-paginated.svelte'; | ||
| import Tooltip from '$lib/holocene/tooltip.svelte'; | ||
|
|
@@ -12,6 +13,8 @@ | |
| fetchPaginatedWorkflows, | ||
| } from '$lib/services/workflow-service'; | ||
| import { configurableTableColumns } from '$lib/stores/configurable-table-columns'; | ||
| import { viewFeature } from '$lib/stores/new-feature-tags'; | ||
| import { tableDensity } from '$lib/stores/table-density'; | ||
| import { refresh, workflowCount } from '$lib/stores/workflows'; | ||
| import type { WorkflowExecution } from '$lib/types/workflows'; | ||
| import { exportWorkflows } from '$lib/utilities/export-workflows'; | ||
|
|
@@ -74,6 +77,13 @@ | |
| }; | ||
|
|
||
| $: onFetch = () => fetchPaginatedWorkflows(namespace, query); | ||
|
|
||
| $: dense = $tableDensity === 'dense'; | ||
|
|
||
| const setTableDensity = () => { | ||
| $tableDensity = dense ? 'comfortable' : 'dense'; | ||
| viewFeature('tableDensity'); | ||
| }; | ||
| </script> | ||
|
|
||
| {#key [namespace, query, $refresh]} | ||
|
|
@@ -109,14 +119,14 @@ | |
| childCount={childrenActive(workflow)?.children.length} | ||
| > | ||
| {#each columns as column} | ||
| <TableBodyCell {workflow} {column} /> | ||
| <TableBodyCell {workflow} {column} truncate={dense} /> | ||
| {/each} | ||
| </TableRow> | ||
| {#if childrenActive(workflow)} | ||
|
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.
|
||
| {#each childrenActive(workflow).children as child (`${child.id}:${child.runId}`)} | ||
| <TableRow workflow={child} child> | ||
| {#each columns as column} | ||
| <TableBodyCell workflow={child} {column} /> | ||
| <TableBodyCell workflow={child} {column} truncate={dense} /> | ||
| {/each} | ||
| </TableRow> | ||
| {/each} | ||
|
|
@@ -128,6 +138,21 @@ | |
| </TableEmptyState> | ||
| </svelte:fragment> | ||
| <svelte:fragment slot="actions-end-additional" let:visibleItems let:page> | ||
| <Tooltip | ||
| text={dense | ||
| ? translate('common.dense') | ||
| : translate('common.comfortable')} | ||
| top | ||
| > | ||
| <FeatureTag feature="tableDensity" alpha /> | ||
| <Button | ||
| on:click={setTableDensity} | ||
| data-testid="table-density-button" | ||
| size="xs" | ||
| variant="ghost" | ||
| leadingIcon={dense ? 'table-dense' : 'table-comfy'} | ||
| ></Button> | ||
| </Tooltip> | ||
| <Tooltip text={translate('common.download-json')} top> | ||
| <Button | ||
| on:click={() => exportWorkflows(visibleItems, page)} | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.