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: Make prettier work on Svelte files #3353

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion mathesar_ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"plugins": ["prettier-plugin-sort-json"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
"plugins": ["prettier-plugin-sort-json", "prettier-plugin-svelte"],
"proseWrap": "never",
"singleQuote": true,
"trailingComma": "all"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@

&.is-edit-mode {
padding: 0px;
box-shadow: 0 0 0 3px var(--sky-700), 0 0 8px #000000 !important;
box-shadow:
0 0 0 3px var(--sky-700),
0 0 8px #000000 !important;
}

&.truncate {
Expand Down
4 changes: 3 additions & 1 deletion mathesar_ui/src/components/sortable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ This is a set of Svelte actions which make it easy to add drag-and-drop sorting
<div
use:sortableContainer={{
getItems: () => items,
onSort: (newItems) => { items = newItems; }
onSort: (newItems) => {
items = newItems;
},
}}
>
{#each items as item}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
background-color: var(--sand-400);
}
}
:global(.collapsible
> .collapsible-header
> button.btn
.collapsible-header-title) {
:global(
.collapsible
> .collapsible-header
> button.btn
.collapsible-header-title
) {
font-weight: 590;
}
:global(.collapsible .section-content.actions .delete-button) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class="header-cell-root">
<CellBackground when={isSelected} color="var(--cell-bg-color-row-selected)" />
<div
class="header-cell-btn btn btn-ghost size-medium "
class="header-cell-btn btn btn-ghost size-medium"
style="cursor: inherit;"
on:click
on:mousedown
Expand Down
4 changes: 3 additions & 1 deletion mathesar_ui/src/systems/table-view/row/CellErrors.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
.errors {
background: var(--red-100);
border: solid 0.1em var(--red-200);
box-shadow: #000 0 0 0 0, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px,
box-shadow:
#000 0 0 0 0,
rgba(0, 0, 0, 0.05) 0px 0px 0px 1px,
rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
border-radius: 0.4em;
Expand Down
10 changes: 6 additions & 4 deletions mathesar_ui/src/systems/table-view/row/Row.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@
&.is-add-placeholder {
cursor: pointer;

:global([data-sheet-element='cell']:not(.is-active)
.cell-fabric
.cell-wrapper
> *) {
:global(
[data-sheet-element='cell']:not(.is-active)
.cell-fabric
.cell-wrapper
> *
) {
visibility: hidden;
}
}
Expand Down