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

👀 Spike - Create folder from within the UI (for content) #4496

Open
1 task done
scottgallant opened this issue Apr 18, 2024 Discussed in #3821 · 4 comments
Open
1 task done

👀 Spike - Create folder from within the UI (for content) #4496

scottgallant opened this issue Apr 18, 2024 Discussed in #3821 · 4 comments
Assignees

Comments

@scottgallant
Copy link
Member

scottgallant commented Apr 18, 2024

CC @JackDevAU @jeffsee55

User Story:

"As a content editor I want to create folders for content in my GitHub repo so I can better organize my content"

  • ✅ Nested Files and Folders - Unlimited nested folders* (Or if GitHub has a max depth)
  • ✅ What is the UX for navigating these folders - Breadcrumb, list of files
  • ❌ Should we have folders displayed in the side nav bar - Not required
  • ✅ Will these be stored in GitHub (inside the content dir) or a TInaCloud UI management feature
  • ✅ Look into configuration - Enable/Disable nested folder creation for Collections

Tasks

  • Investigate effort required to implement this

UI

Suggestion is to add an option for folder in this button
Screenshot 2024-04-21 at 9 13 43 PM

Additional context in this old discussion #3821

@scottgallant scottgallant changed the title Folder Management / Better Collection UX Spike - create folder from within the UI (for content) Apr 22, 2024
@ncn-ssw ncn-ssw changed the title Spike - create folder from within the UI (for content) 👀 Spike - Create folder from within the UI (for content) Apr 22, 2024
@kldavis4 kldavis4 self-assigned this May 18, 2024
@kldavis4
Copy link
Member

kldavis4 commented May 18, 2024

Created a PoC here: https://github.com/tinacms/tinacms/tree/kldavis4/poc/create_folder

To try it out: pnpm i && pnpm build && cd examples/tina-self-hosted-demo && pnpm run dev

This uses a placeholder approach. Added some logic to the database.put which looks for the placeholder and removes it automatically. Not sure if we want / need this but seemed like a good feature.

If we are ok with this approach, I think most of the remaining work is cleaning up the UI to make it a single create button and adding logic to disallow nested folder creation if we want it to be configurable.

Demo Video: https://youtu.be/zIvobYCkG4k

@JackDevAU
Copy link
Member

Hey @kldavis4

Thanks for diving into this - this is perfect!

The next few steps for this,

  • Fix up the UI
  • Add a configuration option to allow for Enable/Disable of nested folder creation in Collections

@kldavis4
Copy link
Member

@JackDevAU just pushed up some changes to the PoC

  • added ui.allowedActions.createNestedfolder to allow disabling folder creation
  • fixed modal button label
  • switched to using .gitkeep and not automatically cleaning up

@kldavis4
Copy link
Member

Also updated desc on #4538 with the remaining tasks so I think this is good to close

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

No branches or pull requests

4 participants