diff --git a/inlang/source-code/editor/src/pages/@host/@owner/@repository/Layout.tsx b/inlang/source-code/editor/src/pages/@host/@owner/@repository/Layout.tsx index 9f571156d8..790ed478e5 100644 --- a/inlang/source-code/editor/src/pages/@host/@owner/@repository/Layout.tsx +++ b/inlang/source-code/editor/src/pages/@host/@owner/@repository/Layout.tsx @@ -18,6 +18,7 @@ import IconSync from "~icons/material-symbols/sync-outline" import IconTranslate from "~icons/material-symbols/translate" import IconSettings from "~icons/material-symbols/settings-outline" import IconDescription from "~icons/material-symbols/description-outline" +import IconTag from "~icons/material-symbols/tag" import { WarningIcon } from "./components/Notification/NotificationHint.jsx" import { showToast } from "#src/interface/components/Toast.jsx" import { isValidLanguageTag, type LanguageTag } from "@inlang/sdk" @@ -46,6 +47,8 @@ export function Layout(props: { children: JSXElement }) { setFilteredMessageLintRules, filteredLanguageTags, setFilteredLanguageTags, + filteredIds, + setFilteredIds, languageTags, currentBranch, activeProject, @@ -86,6 +89,11 @@ export function Layout(props: { children: JSXElement }) { /> ), }, + { + name: "Message Ids", + icon: , + component: , + }, ]) const [selectedFilters, setSelectedFilters] = createSignal([]) @@ -121,7 +129,7 @@ export function Layout(props: { children: JSXElement }) { //add initial language filter createEffect( on(project, () => { - if (lixErrors().length === 0 && project()) { + if (project()) { addFilter("Language") if (filteredLanguageTags().length === 0 && project()!.settings()) setFilteredLanguageTags(project()!.settings()!.languageTags) @@ -129,6 +137,17 @@ export function Layout(props: { children: JSXElement }) { }) ) + //add initial language filter + createEffect( + on(project, () => { + if (project() && filteredIds().length > 0) { + addFilter("Message Ids") + if (filteredLanguageTags().length === 0 && project()!.settings()) + setFilteredIds(project()!.query.messages.includedMessageIds()) + } + }) + ) + //add initial lintRule filter createEffect( on(project, () => { @@ -720,7 +739,7 @@ function LintFilter(props: { clearFunction: any }) {

}> - everyMessage + not selected + + + + +
+ Select + setFilteredIds(project()?.query.messages.includedMessageIds() ?? [])} + > + All + + setFilteredIds([])} + > + None + +
+ +
+ + {(id) => ( + + + {id} + + + )} + +
+ + ) +} diff --git a/inlang/source-code/editor/src/pages/@host/@owner/@repository/components/Listheader.tsx b/inlang/source-code/editor/src/pages/@host/@owner/@repository/components/Listheader.tsx index 4924d7b6ca..566e021446 100644 --- a/inlang/source-code/editor/src/pages/@host/@owner/@repository/components/Listheader.tsx +++ b/inlang/source-code/editor/src/pages/@host/@owner/@repository/components/Listheader.tsx @@ -1,7 +1,6 @@ import { useEditorState } from "../State.jsx" import { For, Show, createMemo } from "solid-js" import { TourHintWrapper } from "./Notification/TourHintWrapper.jsx" -import IconArrowLeft from "~icons/material-symbols/arrow-back-rounded" import IconAdd from "~icons/material-symbols/add" import { type InstalledMessageLintRule, type MessageLintRule } from "@inlang/sdk" import { messageCount } from "../+Page.jsx" @@ -13,7 +12,6 @@ export const ListHeader = () => { filteredMessageLintRules, filteredLanguageTags, filteredIds, - setFilteredIds, setTourStep, tourStep, } = useEditorState() @@ -54,24 +52,7 @@ export const ListHeader = () => { return (
- - setFilteredIds([])}> - {/* @ts-ignore */} - - Back to all messages - -
- Isolated view -
-
- } - > -
{messageCount() + " Messages"}
- - +
{messageCount() + " Messages"}
{(lintRule) => ( diff --git a/inlang/source-code/editor/src/renderer/app.css b/inlang/source-code/editor/src/renderer/app.css index 06120df51c..da29790b8d 100644 --- a/inlang/source-code/editor/src/renderer/app.css +++ b/inlang/source-code/editor/src/renderer/app.css @@ -205,13 +205,13 @@ sl-option::part(checked-icon) { } sl-option::part(base) { + padding-block: 0.375rem; padding-inline: 0.75rem; } sl-option::part(label) { display: flex; align-items: center; - line-height: 1; } sl-select::part(tag) { @@ -303,3 +303,13 @@ sl-details::part(content) { sl-button::part(caret) { width: 1rem; } + +sl-select.ids-filter::part(tags) { + display: none; +} + +sl-option.ids-filter::part(label) { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +}