Skip to content

fix: Add forbidden symbols restrictions for the files and folders name. Add warning for the dot in the start of the files and folders name (Issues #570, #571) #562

Open
denys-kolomiitsev wants to merge 15 commits intodevelopmentfrom
feat/537-add-restricted-symbols
Open

fix: Add forbidden symbols restrictions for the files and folders name. Add warning for the dot in the start of the files and folders name (Issues #570, #571) #562
denys-kolomiitsev wants to merge 15 commits intodevelopmentfrom
feat/537-add-restricted-symbols

Conversation

@denys-kolomiitsev
Copy link
Contributor

@denys-kolomiitsev denys-kolomiitsev commented Mar 16, 2026

Description and UI changes:

Add forbidden symbols restrictions for the files and folders name. Add warning for the dot in the start of the files and folders name.

Issues:

Checklist:

  • the pull request name complies with Conventional Commits
  • the pull request name ends with (Issue #<TICKET_ID>) (comma-separated list of issues)

New Component Checklist:

  • component name starts with Dial
  • custom css classes has dial- prefix
  • component export added to index.ts
  • jsdoc is added for component
  • absolute paths are used for imports
    e.g. import { Button } from '@/components/Button/Button instead of import { Button } from '../../Button/Button
  • stories are added
  • tests are added

@denys-kolomiitsev denys-kolomiitsev self-assigned this Mar 16, 2026
@denys-kolomiitsev denys-kolomiitsev changed the title fix: add default restricted symbols RegExp fix: Add forbidden symbols restrictions for the files and folders name. Add warning for the dot in the start of the files and folders name (Issues #570, #571) Mar 19, 2026
@denys-kolomiitsev denys-kolomiitsev added the enhancement New feature or request label Mar 19, 2026
@denys-kolomiitsev denys-kolomiitsev marked this pull request as ready for review March 19, 2026 12:52
@valerydluski valerydluski requested a review from Copilot March 19, 2026 13:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the File Manager UX by introducing forbidden-symbol name handling (disabled styling + restricted actions) and adding a warning indicator when a user tries to rename an item to a dot-prefixed (hidden) name, addressing Issues #570 and #571.

Changes:

  • Introduces shared validation constants/regex for forbidden symbols and spaces.
  • Restricts available context-menu actions and applies “invalid name” styling/tooltip behavior when names contain forbidden characters.
  • Adds dot-prefix warning support during renaming, with warning icon display support in the rename input.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/index.ts Exports newly introduced validation constants/regex from the package entrypoint.
src/constants/validation.ts Adds default forbidden-symbol / whitespace regex constants.
src/constants/file-grid-columns.tsx Propagates forbidden-symbol validation into grid name rendering and invalid-name styling.
src/components/FolderName/FolderName.tsx Adds invalid-name styling and custom tooltip content support.
src/components/FileName/FileName.tsx Adds invalid-name styling and custom tooltip content support.
src/components/FileManager/utils.ts Adds helper to build a tooltip message when forbidden symbols are detected.
src/components/FileManager/hooks/use-item-renaming.tsx Adds dot-prefix “hidden item” warning message behavior during rename validation.
src/components/FileManager/hooks/use-grid-context-menu.tsx Hides most context-menu actions for items with forbidden symbols in their names.
src/components/FileManager/hooks/use-file-manager-columns.tsx Extends grid context with forbidden-symbol validation/tooltip fields.
src/components/FileManager/components/FoldersTree/FoldersTree.tsx Threads forbidden-symbol validation into tree item name rendering and tooltip creation.
src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.tsx Displays warning vs error icon based on message prefix.
src/components/FileManager/components/FileManagerItemName/FileManagerItemName.tsx Applies invalid-name styling and custom tooltip content in non-editing mode.
src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.tsx Threads forbidden-symbol validation into compact view item rendering.
src/components/FileManager/FileManagerProvider.tsx Adds default forbidden-symbol regex and passes validation/tooltip through context.
src/components/FileManager/FileManagerContext.tsx Extends context with forbidden-symbol validation/tooltip fields.
src/components/FileManager/FileManager.tsx Integrates forbidden-symbol checks into grid/tree context menus and hover tooltip behavior.
src/components/EllipsisTooltip/EllipsisTooltip.tsx Adds support for overriding tooltip content when truncated.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

denys-kolomiitsev and others added 5 commits March 19, 2026 16:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
valerydluski
valerydluski previously approved these changes Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants