Skip to content

fix(files): apply the picked member role when creating a space - #3459

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/create-space-member-role
Sep 25, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/create-space-member-role

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Description

When creating a space via the options of the create space modal, members always ended up with the first space role ("Can view"), even if another role like "Can edit" was picked.

SpaceMemberSelect rebuilt the member list right after setting its roleId model. Since the model is bound by the parent, the new id only arrives once the parent passes it back down, so the rebuild still used the previous role. The member list is now rebuilt by a watcher on the selected collaborators and role, so it picks up the role once it has actually arrived.

Related Issue

  • Fixes <issue_link>

How Has This Been Tested?

  • test environment: local dev setup, Vitest
  • test case 1: new unit test in SpaceMemberSelect.spec.ts - select a member, pick "Can edit", the emitted member carries space-editor (fails without the fix)
  • test case 2: the test wrapper now binds onUpdate:roleId like a real parent, all CreateSpace modal unit tests pass

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)

@v-scharf v-scharf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested, works fine 👍

@AlexAndBear
AlexAndBear force-pushed the fix/create-space-member-role branch from fe7b4fa to ef1b2f1 Compare September 25, 2026 14:17
@AlexAndBear
AlexAndBear force-pushed the fix/create-space-member-role branch from ef1b2f1 to bc02db7 Compare September 25, 2026 14:18
@AlexAndBear
AlexAndBear enabled auto-merge (squash) September 25, 2026 14:20
@AlexAndBear
AlexAndBear merged commit 6dba8bb into main Sep 25, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the fix/create-space-member-role branch September 25, 2026 14:33
@openclouders openclouders mentioned this pull request Sep 25, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants