[WIP] MINOR: Naming templates#691
Open
Amoki wants to merge 5 commits into
Open
Conversation
NicolasRichel
requested changes
Jul 1, 2026
|
|
||
| // In-memory cache of effective folder rules, keyed by folder id, to avoid | ||
| // re-fetching the rule on every rename/upload within the same folder. | ||
| const folderRuleCache = new Map(); |
Member
There was a problem hiding this comment.
The cache logic should be moved into NamingConstraintService for code consistency.
| return NamingConstraintService.fetchConflictingDocuments(project); | ||
| }; | ||
|
|
||
| export { NamingConstraintConflictError }; |
Member
There was a problem hiding this comment.
Useless import / export of NamingConstraintConflictError it should be imported directly from services/NamingConstraintService.js in the component.
| const foldersToUpload = ref([]); | ||
| const uploadFiles = async (event, folder = currentFolder.value) => { | ||
| const { files, folders } = await getFilesFromEvent(event); | ||
| const proceedUpload = async (files, folder) => { |
Member
There was a problem hiding this comment.
Suggested change
| const proceedUpload = async (files, folder) => { | |
| const proceedUpload = async ({ files, folders }, folder) => { |
Comment on lines
+359
to
+363
| let folders = []; | ||
| const uploadFiles = async (event, folder = currentFolder.value) => { | ||
| const fromEvent = await getFilesFromEvent(event); | ||
| const files = fromEvent.files; | ||
| folders = fromEvent.folders; |
Member
There was a problem hiding this comment.
Suggested change
| let folders = []; | |
| const uploadFiles = async (event, folder = currentFolder.value) => { | |
| const fromEvent = await getFilesFromEvent(event); | |
| const files = fromEvent.files; | |
| folders = fromEvent.folders; | |
| const uploadFiles = async (event, folder = currentFolder.value) => { | |
| const { files, folders } = await getFilesFromEvent(event); |
| return name ? new File([file], name, { type: file.type }) : file; | ||
| }); | ||
| const validFiles = files.filter((file) => matchName(file.name, rule.rule)); | ||
| proceedUpload([...validFiles, ...finalFiles], folder); |
Member
There was a problem hiding this comment.
Suggested change
| proceedUpload([...validFiles, ...finalFiles], folder); | |
| proceedUpload({ files: [...validFiles, ...finalFiles], folders }, folder); |
| return; | ||
| } | ||
|
|
||
| proceedUpload(files, folder); |
Member
There was a problem hiding this comment.
Suggested change
| proceedUpload(files, folder); | |
| proceedUpload({ files, folders }, folder); |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://platform-dev-naming-template-2.bimdata.io
Description
Add naming constraints interfaces.

Types of changes
Checklist