Skip to content
Víctor Losada Hernández edited this page Sep 9, 2023 · 20 revisions

Notes on folders

This is a scratch-pad work-in-progress of notes. Once the content settles down into something coherent we may create the issue or PR.

Previously on Github..

The chat about folders has brought up many questions and doubts about how to approach the project

here lies a list of related issues that may contain related info, for the purpose of completeness, i will be including all important info from them as well.

why?

Folders have been suggested for years, as a way to oganize work de-clutter the userpage, and group related documents

Minimum Viable Product (MVP)

As a project starter, a definition of a MVP has been set, that is a product with the minimum necessary features for it to work, and from which we can expand by adding little by little.

The MVP should include:

features

"CRUD" features: create folders, delete folders, update name and contents, and be able to read the contents.

Author-specific
Opening a link for a non-existant folder should trigger a 404
a brew should be able to be in multiple folders at once
folders can have subfolders of their own
no duplicate names for folders inside the same account
Folder should appear in the brew title inside the share and edit pages("Examples: how to make tables") Folders should appear before any brew in the user page

a link should be /user/:userId/:folderName

Data structure

  • __Id (mongo specific ID field, exists wether we create it or not)
  • folderId (nanoid, required, auto)
  • folderName (to use in the URL) (string, required)
  • owner (can be multiple)
  • brewIds(shareId)
  • createdAt
  • UpdatedAt

These folders should be displayed in the user page of the author of such folder , opening the folder would bring the user to another page with the content of the folder displayed as if it was a user page.

So all unpublished files will still be invisible to unauthored accounts, even if they are inside a publicly viewable folder.

"Yes, so the "my campaign" folder can contain a published "magic ring" document that the players can see (because they have attained said ring) and also private "magic sword" document because players have not attained it."

Optimal Final Product

Features:

are private folders publicly viewable?

  • thumnails

  • tags

  • views (useless?)

  • systems

  • description

  • brewCount

  • put someone else's brews into your folder

  • folders inside folders?

  • move brews from folderA to folderB

  • ability to hit a button to publish all brews inside

  • folder password

  • folder object could also have a link to a parent-folder (preferable to a list of contained-folders, to avoid loops etc)

  • select via a picker UI (not by typing strings)

  • store mongoids in codefenced block - store in the brew itself??

  • smart and dumb folders - additional properties

  • plausible deniability if bad password or no password (give me access or give me death aka 404)

The brew metadata panel and folder picker UI should only show the folders belonging to that user, but also maintain back-end the other user's folder assignments.

We do want to facilitate sharing of folder views. That is, a user could share /user/erics/friday-game to his Friday Game participants; or share publicly /user/erics/monsters to the world (although that might be better served as /user/erics?tags=monsters).

Data structure

  • parent folder (nanoid, optional)
  • password (string, optional, hashed)
  • view-count (integer, auto)
  • icon or image (string, optional) (#240)
  • styling (css-text-block, optional) (#240, #1843)
  • folder type (smart/dumb) ??
  • smart-rules (???)
  • tags
  • description
  • brewCount
  • authors

Problem: multiple authors

If we do go with the brew-in-many-folders idea, then reflecting "this brew is in these of your folders" could be informative. Searching by filter or tag on the userpage should reveal any matching brews, even if hidden inside a folder, so that also implies a need for determining enclosing folder starting from brew.

Roadmap (outdated, needs revision)

More detail:

  • create/delete/rename folders on user page

  • designate folder for brew in metadata pane (via picker UI)

  • create/delete/rename folders via picker UI (prereq: picker UI)

  • designate folder for brew on userpage (via picker UI)

  • nested folders

  • update picker UI for nested folders (prereq: nested folders)

  • brews in multiple folders (prereq: dumb flat folders, designate brew folder)

  • tags on brews (prereq: dumb flat folders [see below *])

  • tags visible/filterable on userpages (prereq: tags on brews)

  • (published brews page)

  • tags on published brews page (prereq: tags on brews)

  • smart folders (???)

related issues and discussions

Clone this wiki locally