Skip to content

[FEATURE REQUEST] Create a new space - #4683

Merged
joragua merged 16 commits into
masterfrom
feature/create_new_space
Sep 23, 2025
Merged

joragua merged 16 commits into
masterfrom
feature/create_new_space

Conversation

@joragua

@joragua joragua commented Sep 10, 2025 •

Copy link
Copy Markdown
Member

Related Issues

App: #4606

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

Test Plan: https://github.com/owncloud/QA/blob/master/Mobile/Android/Executions/Release_4.7/Spaces%20-%20Creation.md

@joragua joragua self-assigned this Sep 10, 2025
@joragua joragua linked an issue Sep 10, 2025 that may be closed by this pull request
13 tasks done
@joragua
joragua force-pushed the feature/create_new_space branch 4 times, most recently from 9f3b10c to 4256478 Compare September 17, 2025 06:37
@joragua
joragua force-pushed the feature/create_new_space branch from 83e1ad2 to de0a92a Compare September 18, 2025 07:59
@joragua
joragua force-pushed the feature/create_new_space branch from 1609b29 to 73e1a18 Compare September 18, 2025 12:13
@joragua
joragua marked this pull request as ready for review September 18, 2025 12:39
@joragua
joragua requested a review from jesmrec September 18, 2025 12:39
Comment thread changelog/unreleased/4683 Resolved
@joragua
joragua force-pushed the feature/create_new_space branch from e32371d to 73e1a18 Compare September 19, 2025 12:10
@joragua
joragua force-pushed the feature/create_new_space branch from ba85a57 to 3e9fd8e Compare September 19, 2025 12:16
@joragua
joragua requested a review from jesmrec September 19, 2025 12:18
@joragua
joragua force-pushed the feature/create_new_space branch from e912e86 to 0f3aa05 Compare September 19, 2025 12:45
@joragua
joragua requested a review from jesmrec September 19, 2025 12:45
@jesmrec

jesmrec commented Sep 19, 2025

Copy link
Copy Markdown
Member

All issues fixed. Ready for QA

@jesmrec

jesmrec commented Sep 22, 2025 •

Copy link
Copy Markdown
Member

(1) [FIXED]

After clicking on Create, the list of spaces is not refreshed and no other feedback is provided to the user. Need to scroll down and up, i guess for the recycler view to refresh. Is there any way to refresh the list after creation? Just as example, if you create an space which name is aaaa (it will be listed on the top), after clicking on Create the user sees no effect and gets no feedback about the action.

I think i'd be also a good idea to show an snackbar to notify the correct or incorrect space creation. What do you think?

Video:

Screen_recording_20250922_085544.mp4

Xiaomi Redmi 13
Android 15
0f039fdc0

@jesmrec

jesmrec commented Sep 22, 2025

Copy link
Copy Markdown
Member

About (1), could it happen that the aaaaa space is created but scrolled up?

@jesmrec

jesmrec commented Sep 22, 2025 •

Copy link
Copy Markdown
Member

(2) [FIXED]

  1. Open Space tab of an admin -> FAB is shown
  2. Go to the admin panel in the web, and change the role of that user from admin to user
  3. In the app, click on the FAB.
  4. Enter title and click on Create

Current:

App crashes, because the new role does not allow to create spaces. This is the stacktrace:

FATAL EXCEPTION: DefaultDispatcher-worker-9 (Ask Gemini)
Process: com.owncloud.android.debug, PID: 11864
com.owncloud.android.domain.exceptions.ForbiddenException
    at com.owncloud.android.data.RemoteOperationHandlerKt.handleRemoteOperationResult(RemoteOperationHandler.kt:127)
    at com.owncloud.android.data.RemoteOperationHandlerKt.executeRemoteOperation(RemoteOperationHandler.kt:81)
    at com.owncloud.android.data.spaces.datasources.implementation.OCRemoteSpacesDataSource.createSpace(OCRemoteSpacesDataSource.kt:50)
    at com.owncloud.android.data.spaces.repository.OCSpacesRepository.createSpace(OCSpacesRepository.kt:81)
    at com.owncloud.android.domain.spaces.usecases.CreateSpaceUseCase.run(CreateSpaceUseCase.kt:30)
    at com.owncloud.android.domain.spaces.usecases.CreateSpaceUseCase.run(CreateSpaceUseCase.kt:26)
    at com.owncloud.android.domain.BaseUseCase.invoke(BaseUseCase.kt:30)
    at com.owncloud.android.presentation.spaces.SpacesListViewModel$createSpace$1.invokeSuspend(SpacesListViewModel.kt:145)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
    Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@f28d9d8, Dispatchers.IO]

Expected:

Let the user know that's not posible to create the space, and no crash

Xiaomi Redmi 13
Android 15
0f039fdc0

@jesmrec

jesmrec commented Sep 22, 2025 •

Copy link
Copy Markdown
Member

(3) [FIXED]

  1. Open Space tab of and admin -> FAB is shown
  2. In device, remove internet connection
  3. In the app, click on the FAB.
  4. Enter title and click on Create

Current:

App crashes:

FATAL EXCEPTION: DefaultDispatcher-worker-1 (Ask Gemini)
Process: com.owncloud.android.debug, PID: 15441
com.owncloud.android.domain.exceptions.NoConnectionWithServerException
    at com.owncloud.android.data.RemoteOperationHandlerKt.handleRemoteOperationResult(RemoteOperationHandler.kt:93)
    at com.owncloud.android.data.RemoteOperationHandlerKt.executeRemoteOperation(RemoteOperationHandler.kt:81)
    at com.owncloud.android.data.spaces.datasources.implementation.OCRemoteSpacesDataSource.createSpace(OCRemoteSpacesDataSource.kt:50)
    at com.owncloud.android.data.spaces.repository.OCSpacesRepository.createSpace(OCSpacesRepository.kt:81)
    at com.owncloud.android.domain.spaces.usecases.CreateSpaceUseCase.run(CreateSpaceUseCase.kt:30)
    at com.owncloud.android.domain.spaces.usecases.CreateSpaceUseCase.run(CreateSpaceUseCase.kt:26)
    at com.owncloud.android.domain.BaseUseCase.invoke(BaseUseCase.kt:30)
    at com.owncloud.android.presentation.spaces.SpacesListViewModel$createSpace$1.invokeSuspend(SpacesListViewModel.kt:145)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
    Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@28a8ab4, Dispatchers.IO]

Expected:

No crash when device is offline

Xiaomi Redmi 13
Android 15
0f039fdc0

@joragua

joragua commented Sep 23, 2025

Copy link
Copy Markdown
Member Author

About your reports, @jesmrec:

(1) The space list is refreshed after creating a new space, but if the new space appears at the top of the list (ordered by name), you need to scroll up to see it. Anyway, I’ve added a snackbar after space creation to provide user feedback.

(2) and (3) should be fixed with the last commit

@jesmrec

jesmrec commented Sep 23, 2025

Copy link
Copy Markdown
Member

Approved on my side: Great!! 💯

@joragua
joragua merged commit 912f9ea into master Sep 23, 2025
@joragua
joragua deleted the feature/create_new_space branch September 23, 2025 10:29
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.

[FEATURE REQUEST] Create a new space

3 participants