-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4115 from mathesar-foundation/3183_refresh_button
Improve data explorer UI layout
- Loading branch information
Showing
11 changed files
with
83 additions
and
123 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,65 @@ | ||
<script lang="ts"> | ||
import { _ } from 'svelte-i18n'; | ||
import PaginationGroup from '@mathesar/components/PaginationGroup.svelte'; | ||
import type QueryManager from './QueryManager'; | ||
import type { QueryRunner } from './QueryRunner'; | ||
import QueryRefreshButton from './result-pane/QueryRefreshButton.svelte'; | ||
export let queryHandler: QueryRunner | QueryManager; | ||
$: ({ rowsData, pagination, runState } = queryHandler); | ||
$: recordRunState = $runState?.state; | ||
$: totalCount = $rowsData.totalCount; | ||
</script> | ||
|
||
<div data-identifier="status-bar"> | ||
{#if totalCount} | ||
<div> | ||
{$_('showing_n_to_m_of_total', { | ||
values: { | ||
leftBound: $pagination.leftBound, | ||
rightBound: Math.min(totalCount, $pagination.rightBound), | ||
totalCount, | ||
}, | ||
})} | ||
</div> | ||
{:else if recordRunState === 'success'} | ||
{$_('no_results_found')} | ||
{/if} | ||
<div class="pagination-controls"> | ||
<PaginationGroup | ||
pagination={$pagination} | ||
{totalCount} | ||
on:change={(e) => { | ||
void queryHandler.setPagination(e.detail); | ||
}} | ||
/> | ||
<div class="refresh"> | ||
<QueryRefreshButton queryRunner={queryHandler} /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
[data-identifier='status-bar'] { | ||
flex-grow: 0; | ||
flex-shrink: 0; | ||
border-top: 1px solid var(--slate-300); | ||
background-color: var(--slate-100); | ||
padding: var(--status-bar-padding); | ||
display: flex; | ||
align-items: center; | ||
} | ||
.pagination-controls { | ||
margin-left: auto; | ||
display: flex; | ||
align-items: center; | ||
} | ||
.refresh { | ||
margin-left: var(--size-xx-small); | ||
} | ||
</style> |
This file contains 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 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 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
46 changes: 0 additions & 46 deletions
46
mathesar_ui/src/systems/data-explorer/result-pane/ResultPane.svelte
This file was deleted.
Oops, something went wrong.
This file contains 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