Skip to content

Commit

Permalink
Highlight newly-created schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
seancolsen committed Dec 17, 2024
1 parent ce19d53 commit 4a51a24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions mathesar_ui/src/i18n/languages/en/dict.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@
"schema_name_already_exists": "A schema with that name already exists.",
"schema_name_cannot_be_empty": "Schema name cannot be empty",
"schema_name_placeholder": "Eg. Personal Finances, Movies",
"schema_new_items_scroll_hint": "Scroll or click here to see the schema.",
"schema_not_found": "Schema not found.",
"schema_ownership_updated_successfully": "Schema ownership has been updated successfully.",
"schema_permissions": "Schema Permissions",
Expand Down
7 changes: 6 additions & 1 deletion mathesar_ui/src/pages/database/schemas/SchemasSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { DatabaseRouteContext } from '@mathesar/contexts/DatabaseRouteContext';
import { iconAddNew } from '@mathesar/icons';
import type { Schema } from '@mathesar/models/Schema';
import { highlightNewItems } from '@mathesar/packages/new-item-highlighter';
import { confirmDelete } from '@mathesar/stores/confirmation';
import { modal } from '@mathesar/stores/modal';
import {
Expand Down Expand Up @@ -116,7 +117,11 @@
{/if}
</RichText>
</p>
<ul class="schema-list" slot="content">
<ul
class="schema-list"
slot="content"
use:highlightNewItems={{ scrollHint: $_('schema_new_items_scroll_hint') }}
>
{#if schemasRequestStatus.state === 'success'}
{#each displayList as schema (schema.oid)}
<li class="schema-list-item">
Expand Down

0 comments on commit 4a51a24

Please sign in to comment.