-
Notifications
You must be signed in to change notification settings - Fork 109
Fix rich workspaces on case insensitive filesystems #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/backport to stable19 |
|
/backport to stable18 |
|
/compile / |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
src/views/RichWorkspace.vue
Outdated
| } | ||
| this.creating = true | ||
| window.FileList.createFile('Readme.md', { scrollTo: false, animate: false }).then((status, data) => { | ||
| window.FileList.createFile(t('text', 'Readme') + '.md', { scrollTo: false, animate: false }).then((status, data) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind to explain that change 🤔 You want to support 'Liesmich.md` as well 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly fixing the behavior I assumed I had already implemented 🙈
See #727 (comment) for the discussion on the translated file name 😉
I also think the german "Anleitung.md" is a bit odd, but also agree with @jancborchardt that Readme.md is a quite technical description that might confuse users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh :) I think translating the file name is a mistake. You add a lot of complexity and weirdness but fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current assumption is that everyone uses the same language:
- We have Alice (lang: german) and Bob (lang: english)
- Alice creates a folder and uses rich workspace. A file
Anleitung.mdis created. - Alice shares the Folder to Bob.
- Bob does not see rich workspace because
Anleitung.mdis not a valid file name for him. - Bob also uses rich workspace. A file
Readme.mdis created. - They both edit rich workspace but do not see their changes ;)
Sure. We could fetch all languages (or all languages for a folder shared with other users), collect all translations for readme and check their existence. Probably easier to add some explanation about the Readme.md and Rich Workspace instead of magic to guess what the user wants ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a very good point actually. Then we probably should keep Readme.md as the default and just allow the translated name to be picked up if such a file exists. What do you think @jancborchardt
I removed this commit from the PR now since it is actually unrelated to the fix for #807 it just was my first trace to the bug. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think @jancborchardt
I always think that the task of software is to reduce complexity towards people using the software – and yes that means more complexity in the code, which is fine. :) It will be very strange to any non-English speaker, especially non-native, if a file called "Readme.md" shows up in their file list.
Every application has an inherent amount of irreducible complexity. The only question is: Who will have to deal with it—the user, the application developer, or the platform developer?
See https://en.wikipedia.org/wiki/Law_of_conservation_of_complexity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just to clarify: I do realize this would probably be a ton of work, so feel free to put it very far down on the todo list or not on it at all. ;)
(Also, there might be confusion the other way around when someone on the team says "Check the readme" and it’s called differently for everyone.)
This fixes multiple files showing up on case-insensitive filenames as otherwise the IFolder::get call creates multiple entries in the filecache for the same file Signed-off-by: Julius Härtl <[email protected]>
|
if this was supposed to fix multiple Readme.md being created on case insensitive file systems - it did not fix it as shown in #1546 |
Fixes #807
This fixes multiple files showing up on case-insensitive filenames as otherwise
the IFolder::get call creates multiple entries in the filecache for the same file. In addition to the fix now the behaviour is actually the correct one where the first matching filename of supported names is picked up for creating the file and obtaining in case there are multiple names matching.