-
Notifications
You must be signed in to change notification settings - Fork 115
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 #2392 from opral/introduce-settings-component-into…
…-sherlock introduce settings component in Sherlock 🕵️♂️
- Loading branch information
Showing
19 changed files
with
385 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vs-code-extension": minor | ||
--- | ||
|
||
introduce inlang settings component |
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,7 @@ | ||
--- | ||
"@inlang/message-lint-rule-identical-pattern": patch | ||
"@inlang/plugin-next-intl": patch | ||
"@inlang/plugin-i18next": patch | ||
--- | ||
|
||
fix typo |
120 changes: 120 additions & 0 deletions
120
inlang/source-code/ide-extension/assets/settings-view.css
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,120 @@ | ||
/* settings webview */ | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
html, body { | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe WUI", "Ubuntu", sans-serif; | ||
color: var(--vscode-foreground); | ||
background-color: var(--vscode-sideBar-background); | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
user-select: text; | ||
-webkit-user-select: text; | ||
} | ||
|
||
main { | ||
padding: 20px; | ||
} | ||
|
||
main > h1 { | ||
font-size: 22px; | ||
margin-block-end: 20px; | ||
} | ||
|
||
inlang-settings { | ||
/* Primary */ | ||
--inlang-color-primary: var(--vscode-button-background); | ||
--inlang-color-neutral: var(--vscode-foreground); | ||
/* Input */ | ||
--sl-input-background-color: var(--vscode-input-background); | ||
--sl-input-background-color-disabled: var(--vscode-input-background); | ||
--sl-input-border-color: var(--vscode-input-border); | ||
--sl-input-border-color-hover: var(--vscode-input-activeBorder); | ||
--sl-input-border-color-focus: var(--vscode-input-activeBorder); | ||
--sl-input-border-radius: 4px; | ||
--sl-input-border-width: 1px; | ||
--sl-input-color: var(--vscode-input-foreground); | ||
--sl-input-color-hover: var(--vscode-input-foreground); | ||
--sl-input-color-focus: var(--vscode-input-foreground); | ||
--sl-input-color-disabled: var(--vscode-disabledForeground); | ||
--sl-input-focus-ring-color: var(--vscode-focusBorder); | ||
--sl-input-icon-color: var(--vscode-input-foreground); | ||
--sl-input-icon-color-hover: var(--vscode-input-foreground); | ||
--sl-input-icon-color-focus: var(--vscode-input-foreground); | ||
--sl-input-placeholder-color: var(--vscode-input-foreground); | ||
--sl-input-placeholder-color-disabled: var(--vscode-disabledForeground); | ||
/* Input Filled */ | ||
--sl-input-filled-background-color: var(--vscode-input-background); | ||
--sl-input-filled-background-color-hover: var(--vscode-input-background); | ||
--sl-input-filled-background-color-focus: var(--vscode-input-background); | ||
--sl-input-filled-background-color-disabled: var(--vscode-input-background); | ||
--sl-input-filled-color: var(--vscode-input-foreground); | ||
--sl-input-filled-color-hover: var(--vscode-input-foreground); | ||
--sl-input-filled-color-focus: var(--vscode-disabledForeground); | ||
--sl-input-filled-color-disabled: var(--vscode-); | ||
--sl-input-help-text-color: var(--vscode-descriptionForeground); | ||
/* Focus Ring */ | ||
--sl-focus-ring-color: var(--vscode-focusBorder); | ||
--sl-focus-ring-width: 3px; | ||
--sl-focus-ring-offset: 1px; | ||
/* Tooltip */ | ||
--sl-tooltip-background-color: var(--vscode-button-background); | ||
--sl-tooltip-color: var(--vscode-button-foreground); | ||
/* Panels */ | ||
--sl-panel-background-color: var(--vscode-sideBar-background); | ||
--sl-panel-border-color: var(--vscode-sideBar-background); | ||
--sl-panel-border-width: 1px; | ||
} | ||
|
||
inlang-settings::part(base) { | ||
gap: 36px; | ||
} | ||
|
||
inlang-settings::part(module) { | ||
gap: 28px; | ||
} | ||
|
||
|
||
inlang-settings::part(property-title) { | ||
font-size: 16px; | ||
font-weight: 600; | ||
} | ||
|
||
inlang-settings::part(property-paragraph) { | ||
font-size: 14px; | ||
color: var(--vscode-descriptionForeground); | ||
} | ||
|
||
inlang-settings::part(option-wrapper) { | ||
/* FIXME after https://github.com/shoelace-style/shoelace/issues/1968 */ | ||
background-color: var(--vscode-input-background) !important; | ||
} | ||
|
||
inlang-settings::part(option) { | ||
color: var(--vscode-input-foreground); | ||
/* FIXME after https://github.com/shoelace-style/shoelace/issues/1968 */ | ||
background-color: var(--vscode-input-background) !important; | ||
font-size: 14px; | ||
padding: 8px 12px; | ||
} | ||
|
||
inlang-settings::part(button) { | ||
color: var(--vscode-button-secondaryForeground); | ||
background-color: var(--vscode-button-secondaryBackground); | ||
border-color: var(--vscode-button-secondaryBackground); | ||
} | ||
|
||
inlang-settings::part(float) { | ||
background-color: var(--vscode-sideBar-background); | ||
color: var(--vscode-sideBar-foreground); | ||
border: 1px solid var(--vscode-sideBar-border); | ||
} | ||
inlang-settings::part(cancel) { | ||
background-color: var(--vscode-button-secondaryBackground); | ||
color: var(--vscode-button-secondaryForeground); | ||
} |
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
18 changes: 18 additions & 0 deletions
18
inlang/source-code/ide-extension/src/commands/openSettingsView.ts
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,18 @@ | ||
import { commands } from "vscode" | ||
import { telemetry } from "../services/telemetry/implementation.js" | ||
import { settingsPanel } from "../utilities/settings/settingsView.js" | ||
import type { ProjectViewNode } from "../utilities/project/project.js" | ||
|
||
export const openSettingsViewCommand = { | ||
command: "sherlock.openSettingsView", | ||
title: "Sherlock: Open Settings View", | ||
register: commands.registerCommand, | ||
callback: async function (node: ProjectViewNode) { | ||
await settingsPanel({ context: node.context }) | ||
|
||
telemetry.capture({ | ||
event: "IDE-EXTENSION Settings View opened", | ||
}) | ||
return undefined | ||
}, | ||
} |
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
Oops, something went wrong.