feat: hide dotfiles in file explorer (#1516)
* feat: hide dotfiles in file explorer * refactor: rename to "hidden files" and read flag from store Rename the explorer dotfile toggle to show-semantics "hidden files" so copy and code share one cross-platform vocabulary, and stop prop-drilling the flag now that it lives in the panel store. - explorerShowHiddenFiles (default true) replaces explorerHideDotFiles; i18n keys + translations switched from "dotfiles" to "hidden files" - imperative helpers read usePanelStore.getState() instead of taking the flag as a parameter; flag stays threaded only through the reactive tree-row render path - drop dead usePanelState exposure; collapse migration double-guard * fix: address Greptile review on hidden-file path matching - isHiddenExplorerPath no longer treats ".." segments as hidden (only "." was exempt before); add tests for ".." and "../sibling" - assert the showHiddenFiles i18n key alongside hideHiddenFiles --------- Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
co-authored by
Mohamed Boudra
parent
f4450cda51
commit
eb94b70848
@@ -224,7 +224,10 @@ describe("translation resources", () => {
|
||||
expect(en.importSession.status.connectHost).toBe("Connect to a host to import sessions");
|
||||
expect(en.importSession.actions.refresh).toBe("Refresh sessions");
|
||||
expect(en.workspace.fileExplorer.sort.name).toBe("Name");
|
||||
expect(en.workspace.fileExplorer.actions.hideHiddenFiles).toBe("Hide hidden files");
|
||||
expect(en.workspace.fileExplorer.actions.showHiddenFiles).toBe("Show hidden files");
|
||||
expect(en.workspace.fileExplorer.empty.noFiles).toBe("No files");
|
||||
expect(en.workspace.fileExplorer.empty.noVisibleFiles).toBe("No visible files");
|
||||
expect(en.workspace.setup.status.running).toBe("Running");
|
||||
expect(en.workspace.setup.empty.noCommands).toBe("No setup commands ran for this workspace.");
|
||||
expect(en.workspace.browser.unavailable.title).toBe("Browser is desktop-only");
|
||||
|
||||
@@ -355,9 +355,12 @@ export const ar: TranslationResources = {
|
||||
retry: "أعد المحاولة",
|
||||
refresh: "تحديث الملفات",
|
||||
refreshing: "تحديث الملفات",
|
||||
hideHiddenFiles: "إخفاء الملفات المخفية",
|
||||
showHiddenFiles: "إظهار الملفات المخفية",
|
||||
},
|
||||
empty: {
|
||||
noFiles: "لا توجد ملفات",
|
||||
noVisibleFiles: "لا توجد ملفات مرئية",
|
||||
},
|
||||
states: {
|
||||
unavailable: "Workspace غير متوفر",
|
||||
|
||||
@@ -354,9 +354,12 @@ export const en = {
|
||||
retry: "Retry",
|
||||
refresh: "Refresh files",
|
||||
refreshing: "Refreshing files",
|
||||
hideHiddenFiles: "Hide hidden files",
|
||||
showHiddenFiles: "Show hidden files",
|
||||
},
|
||||
empty: {
|
||||
noFiles: "No files",
|
||||
noVisibleFiles: "No visible files",
|
||||
},
|
||||
states: {
|
||||
unavailable: "Workspace is unavailable",
|
||||
|
||||
@@ -358,9 +358,12 @@ export const es: TranslationResources = {
|
||||
retry: "Rever",
|
||||
refresh: "Actualizar archivos",
|
||||
refreshing: "Actualizar archivos",
|
||||
hideHiddenFiles: "Ocultar archivos ocultos",
|
||||
showHiddenFiles: "Mostrar archivos ocultos",
|
||||
},
|
||||
empty: {
|
||||
noFiles: "Sin archivos",
|
||||
noVisibleFiles: "No hay archivos visibles",
|
||||
},
|
||||
states: {
|
||||
unavailable: "Workspaceno está disponible",
|
||||
|
||||
@@ -358,9 +358,12 @@ export const fr: TranslationResources = {
|
||||
retry: "Réessayer",
|
||||
refresh: "Actualiser les fichiers",
|
||||
refreshing: "Actualisation des fichiers",
|
||||
hideHiddenFiles: "Masquer les fichiers cachés",
|
||||
showHiddenFiles: "Afficher les fichiers cachés",
|
||||
},
|
||||
empty: {
|
||||
noFiles: "Aucun fichier",
|
||||
noVisibleFiles: "Aucun fichier visible",
|
||||
},
|
||||
states: {
|
||||
unavailable: "Workspacen'est pas disponible",
|
||||
|
||||
@@ -357,9 +357,12 @@ export const ru: TranslationResources = {
|
||||
retry: "Повторить попытку",
|
||||
refresh: "Обновить файлы",
|
||||
refreshing: "Обновление файлов",
|
||||
hideHiddenFiles: "Скрыть скрытые файлы",
|
||||
showHiddenFiles: "Показать скрытые файлы",
|
||||
},
|
||||
empty: {
|
||||
noFiles: "Нет файлов",
|
||||
noVisibleFiles: "Нет видимых файлов",
|
||||
},
|
||||
states: {
|
||||
unavailable: "Workspace недоступен",
|
||||
|
||||
@@ -355,9 +355,12 @@ export const zhCN: TranslationResources = {
|
||||
retry: "重试",
|
||||
refresh: "刷新文件",
|
||||
refreshing: "正在刷新文件",
|
||||
hideHiddenFiles: "隐藏隐藏文件",
|
||||
showHiddenFiles: "显示隐藏文件",
|
||||
},
|
||||
empty: {
|
||||
noFiles: "没有文件",
|
||||
noVisibleFiles: "没有可见文件",
|
||||
},
|
||||
states: {
|
||||
unavailable: "Workspace 不可用",
|
||||
|
||||
Reference in New Issue
Block a user