Skip to content

feat: create a space with quota, subtitle, description, image and members - #3413

Merged
AlexAndBear merged 1 commit into
mainfrom
issues/1188
Sep 22, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
issues/1188

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Description

image image

Create a space with everything already set, instead of configuring it afterwards. The name-only dialog stays as it was — an Options toggle (same pattern as public links) reveals the rest.

Added

  • Options panel with two collapsible groups, each on its own surface: presentation (image, subtitle, description), open by default, and advanced (quota, members). Opening a group scrolls it into view.
  • In options mode a 16:9 space icon sits next to the name and doubles as the preview for the picked image, falling back to the vault icon for an encrypted space.
  • Everything the options collected survives a trip through the encryption step and back, members and their role included.
  • The suggested space name counts up past the names already taken, the same way a new folder does.
  • CreateSpaceOptions.vue, SpaceImagePicker.vue (upload + crop, or an emoji via the existing icon picker, previewed next to the name), SpaceMemberSelect.vue (recipient autocomplete + role).
  • useCreateSpace applies the options once the drive exists: setSpaceReadme, setSpaceImage, applyMembers.
  • Per-step error handling: each step runs on its own and failures are collected into one summary toast, so a space that was created is never rolled back because e.g. its image failed.
  • useSpaceImage — saves a cropped image on an existing space and reports the outcome.
  • useCollaboratorAutocomplete — the debounced recipient search, shared with the sidebar invite form.

Changed

  • ModalWrapper renders the whole modal stack instead of only the active one, so the cropper can open over the create-space modal without resetting it.
  • OcModal gained active (only the topmost dims the background and holds the focus trap) and per-instance title ids, so stacked dialogs don't share one aria-labelledby target.
  • OcDrop outranks the modal layer and hands focus back to its toggle on close.
  • InviteCollaboratorForm uses the new autocomplete composable — behaviour unchanged, ~125 lines lighter.
  • A modal's body is now the scroll container, so its header and footer stay visible with long content.
  • The editor's drag handle hides when a scroll moves the editor out from under it, instead of floating over whatever sits around the editor. Scrolling inside the editor is unaffected.
  • SpaceImageModal and AvatarUpload use @vueuse/core's useObjectUrl instead of a hand-rolled one; the space-image actions delegate their error reporting to useSpaceImage.
  • "Edit description" no longer writes an empty readme over an existing .space/readme.md that the drive doesn't have registered.
  • Member invites go through the shared concurrentRequests.shares.create queue.
  • OcSelect no longer lets vue-select's search input outrank everything outside the select, so it can't show through a sticky footer it scrolls under.

Related Issue

How Has This Been Tested?

  • test environment: local dev server against a local OpenCloud backend, plus pnpm check:all (4171 unit tests, incl. new specs for useSpaceImage, SpaceMemberSelect, CreateSpaceModal, OcDrop, ModalWrapper and TextEditorContent)

Run manually in the browser:

  • test case 1: create a space with name only — unchanged behaviour
  • test case 2: create a space with quota, subtitle, description and members, and check the space afterwards — subtitle, readme, quota and both members with the role they were given
  • test case 3: create a space with an uploaded, cropped image, and one with an emoji icon
  • test case 4: open the cropper from the options panel — the create-space modal keeps its input
  • test case 5: pick members and a role, enable end-to-end encryption, continue, go back — both are still there
  • test case 6: enabling encryption drops the image and the description from the options
  • test case 7: a modal with long content scrolls its body while header and footer stay visible
  • test case 8: hover a line in the description editor, then scroll — the drag handle goes instead of floating outside the editor
  • test case 9: the suggested name counts up past the spaces already using it
  • test case 10: "Edit description" on a space opens its .space/readme.md with the content intact

Not covered: creating an end-to-end encrypted space end to end (needs a vault password), and the summary toast for a failing step.

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear changed the title advances space options Create a space with quota, subtitle, description, image and members Sep 21, 2026
@AlexAndBear
AlexAndBear force-pushed the issues/1188 branch 4 times, most recently from aadbed1 to ea38f7a Compare September 21, 2026 13:44
@AlexAndBear
AlexAndBear marked this pull request as ready for review September 22, 2026 00:33
@AlexAndBear
AlexAndBear force-pushed the issues/1188 branch 12 times, most recently from dc366df to d26f713 Compare September 22, 2026 06:28
@AlexAndBear AlexAndBear self-assigned this Sep 22, 2026
@JammingBen

Copy link
Copy Markdown
Member

Love it!

A few UI things I noticed before looking into the code:

The modal for creating files has a vertical scrollbar now:

image

The modal for creating spaces now has a large margin top & bottom, especially compared to before and the folder modal:

image

@AlexAndBear
AlexAndBear force-pushed the issues/1188 branch 2 times, most recently from 28755d6 to 2398c3c Compare September 22, 2026 08:07
…bers

An `Options` toggle in the create-space dialog reveals image, subtitle,
description, quota and members. The options are applied once the drive
exists; each step runs on its own and failures are collected into one
summary toast, so a space that was created is never rolled back because
e.g. its image failed.

Modals render as a stack, so the image cropper can open over the
create-space dialog without resetting it. A modal's body scrolls while
its header and footer stay in place.
@AlexAndBear
AlexAndBear merged commit ea1c5b2 into main Sep 22, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the issues/1188 branch September 22, 2026 08:51
openclouders pushed a commit that referenced this pull request Sep 22, 2026
…bers (#3413)

An `Options` toggle in the create-space dialog reveals image, subtitle,
description, quota and members. The options are applied once the drive
exists; each step runs on its own and failures are collected into one
summary toast, so a space that was created is never rolled back because
e.g. its image failed.

Modals render as a stack, so the image cropper can open over the
create-space dialog without resetting it. A modal's body scrolls while
its header and footer stay in place.
@openclouders openclouders mentioned this pull request Sep 22, 2026
1 task
@AlexAndBear AlexAndBear changed the title Create a space with quota, subtitle, description, image and members feat: create a space with quota, subtitle, description, image and members Sep 29, 2026
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.

Advanced space creation

2 participants