Skip to content

fix(editors): Adding files inside the subdirectories#1835

Open
MohamedAli00949 wants to merge 6 commits intoelectron:mainfrom
MohamedAli00949:fix-subdir-files
Open

fix(editors): Adding files inside the subdirectories#1835
MohamedAli00949 wants to merge 6 commits intoelectron:mainfrom
MohamedAli00949:fix-subdir-files

Conversation

@MohamedAli00949
Copy link

Description

While building demos for Electron apps, I have found that Fiddle accepts creating files inside a subdirectory.
And these casing issues at the other operations, while using Fiddle.

So I have a suggestion for solving this issue to validate the file name for new files or renaming old files.

Solved issue

#1828

@MohamedAli00949 MohamedAli00949 requested review from a team and codebytere as code owners January 26, 2026 08:25
Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

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

I think the only changes that are needed in src/ can go in addNewFile and renameFile in src/renderer/editor-mosaic.ts.

I think "inside subdir" isn't an ideal error message, I'd make the error message more literal: "filenames cannot include path separators".

@MohamedAli00949
Copy link
Author

I think the only changes that are needed in src/ can go in addNewFile and renameFile in src/renderer/editor-mosaic.ts.

I think "inside subdir" isn't an ideal error message, I'd make the error message more literal: "filenames cannot include path separators".

Okay, I will change them.
And so sorry for this change. I have seen the file name validation using isSupportedFile at renameEditor inside the sidebar editor tree actions, and made such a it.

@MohamedAli00949
Copy link
Author

Hi @dsanders11,
I have completed the required changes. I hope to re-review this PR.
And have a question about the GenericDialog component, which works fine in the tests, but the manual testing shows some unexpected behaviours related to it when be used without an accessible component, and after alot and alot of debugging and refactoring, I have gone to solution I hope to listen about your opinion and POV about it and it's adding accessable component hidden, inside the GenericDialog component.

Thanks in advance

@MohamedAli00949
Copy link
Author

Hi @dsanders11, I have completed the required changes. I hope to re-review this PR. And have a question about the GenericDialog component, which works fine in the tests, but the manual testing shows some unexpected behaviours related to it when be used without an accessible component, and after alot and alot of debugging and refactoring, I have gone to solution I hope to listen about your opinion and POV about it and it's adding accessable component hidden, inside the GenericDialog component.

Thanks in advance

Another solution I have found, and it has appeared to be good until now, is adding an asynchronous timer with a delay of 100 ms before firing the action of showing an error dialog. This makes the error dialog unmounted after being mounted immediately.

I hope if you have any hints for solving this problem, i hope you to tell me, i have made research and read all docs related to MobX and Blueprintjs but can't find the solution of the problem of triggering onConfirm event after mount the component on the screen which is close the dialog.

Hope you well.

show.error.dialog.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants