Skip to content
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

NMC-533 Set new folder name inline #28645

Closed
wants to merge 9 commits into from

Conversation

TSI-kavitasonawane
Copy link
Contributor

@TSI-kavitasonawane TSI-kavitasonawane commented Aug 30, 2021

Close #28669

Add button folder creation changes:

  • Removed the functionality to enter a name to an added folder
  • Changed the function to add a folder: the folder will be created called "New folder" or "Neuer Ordner" with an activated rename function
  • if a folder called "Neuer Ordner" or "New folder" already exists, the created folder will have a counter like "New folder (2)"

Add button text document creation changes:

  • Removed the functionality to enter a name to an added text document
  • The document will be created called "New text document" or "Neues Textdokument" with an activated rename function
  • If a text document is exisitng and already called "New text document" or "Neues Textdokument", the created document will have a counter like "New text document (2)"

@juliushaertl juliushaertl requested review from skjnldsv, juliushaertl, a team, artonge and jancborchardt and removed request for a team August 30, 2021 14:32
@juliushaertl juliushaertl added this to the Nextcloud 23 milestone Aug 30, 2021
@juliushaertl juliushaertl changed the title NMC-533 NMC-533 Set new folder name inline Aug 30, 2021
…ment creation

Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
@skjnldsv skjnldsv requested review from juliushaertl, a team and stweil September 2, 2021 06:16
@skjnldsv
Copy link
Member

skjnldsv commented Sep 2, 2021

Add button text document creation changes:

  • Removed the functionality to enter a name to an added text document
  • The document will be created called "New text document" or "Neues Textdokument" with an activated rename function
  • If a text document is exisitng and already called "New text document" or "Neues Textdokument", the created document will have a counter like "New text document (2)"

@TSI-kavitasonawane The folder changes works great.

But the file one is more subtle.
We also have the template feature, which when it exists allow to create from templates. Since we cannot change the name before, if the file already exists, it fails to create.
image
image

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

See comments

apps/files/js/newfilemenu.js Outdated Show resolved Hide resolved
apps/files/js/newfilemenu.js Outdated Show resolved Hide resolved
apps/files/src/views/TemplatePicker.vue Outdated Show resolved Hide resolved
apps/files/js/newfilemenu.js Show resolved Hide resolved
@skjnldsv
Copy link
Member

skjnldsv commented Sep 2, 2021

Also, JSUnit fails:

TOTAL: 6 FAILED, 809 SUCCESS


1) sets default text in field
     OCA.Files.NewFileMenu New file/folder
     Expected 0 to equal 2.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:73:26)
     Expected undefined to equal 'New folder'.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:74:25)

2) prevents entering invalid file names
     OCA.Files.NewFileMenu New file/folder
     Expected false to equal true.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:81:42)

3) prevents entering file names that already exist
     OCA.Files.NewFileMenu New file/folder
     Expected false to equal true.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:89:42)

4) creates directory when clicking on create directory field
     OCA.Files.NewFileMenu New file/folder
     Expected 'New folder' to equal 'some folder'.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:99:51)

5) calls action handler when clicking on custom item
     OCA.Files.NewFileMenu custom entries
     Expected 'New text file.txt' to equal 'some name'.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:144:42)

6) switching fields removes the previous form
     OCA.Files.NewFileMenu custom entries
     Expected 0 to equal 1.
    at Object.<anonymous> (apps/files/tests/js/newfilemenuSpec.js:148:41)

Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
apps/files/js/newfilemenu.js Outdated Show resolved Hide resolved
Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
@skjnldsv
Copy link
Member

skjnldsv commented Sep 3, 2021

Jsunit needs to be adapted again and tabs indent is still not fixed :)
@TSI-kavitasonawane

@skjnldsv skjnldsv removed the 3. to review Waiting for reviews label Sep 3, 2021
@skjnldsv
Copy link
Member

skjnldsv commented Mar 2, 2022

100% Agree @juliushaertl
I'm up to merge #31396 then

@juliushaertl
Copy link
Member

Filed an issue about it in #31414

@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
@skjnldsv skjnldsv mentioned this pull request May 3, 2023
@skjnldsv skjnldsv closed this May 3, 2023
@AndyScherzinger AndyScherzinger removed this from the Nextcloud 27 milestone May 3, 2023
@tsdicloud tsdicloud deleted the NMC-533 branch July 13, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cursor doesn't work when naming a new file [MINOR]
8 participants