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

Add upload editor in files sidebar mode #4535

Merged
merged 5 commits into from
Feb 9, 2021

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented Nov 5, 2020

Follow up to #3988

Extracted from #4291 for tidiness and easier backporting.

@danxuliu danxuliu added 3. to review bug regression feature: talk-sidebar ⬅️ Sidebar integration of Talk into other apps like sharing and documents labels Nov 5, 2020
@danxuliu danxuliu added this to the 💚 Next Major (21) milestone Nov 5, 2020
@danxuliu
Copy link
Member Author

danxuliu commented Nov 5, 2020

/backport to stable20

@danxuliu
Copy link
Member Author

danxuliu commented Nov 5, 2020

Mmmm, this needs more work (I tested this in stable20, but master should be the same).

  • Open the Files app
  • Share two files
  • Reload the Files app (to work around the bug in the server about FileInfo not being properly updated when a file is shared)
  • Open the sidebar for the first file
  • Join the conversation
  • Upload a file, but close the modal by clicking outside it
  • Open the sidebar for the second file
  • Join the conversation

The modal will be shown again.

@PVince81
Copy link
Member

PVince81 commented Nov 5, 2020

oh, so this was always missing ? otherwise we just hide the upload button for now

@danxuliu danxuliu force-pushed the add-upload-editor-in-files-sidebar-mode branch from d738451 to 2c96454 Compare November 6, 2020 20:31
@danxuliu
Copy link
Member Author

danxuliu commented Nov 6, 2020

oh, so this was always missing ?

It seems so :-)

otherwise we just hide the upload button for now

The latest pushed commits should fix the described issue (and do a small cleanup). But my development machine is doing funny things so I could not properly test it :-(

@PVince81
Copy link
Member

PVince81 commented Nov 9, 2020

but if #4291 is not merged first, then this PR here won't be testable ?

@danxuliu
Copy link
Member Author

The latest pushed commits should fix the described issue (and do a small cleanup). But my development machine is doing funny things so I could not properly test it :-(

Mmm, no, it does not fix the described issue. It changes it, but there is still an issue :-P (the chat tab is empty for the second file).

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The upload editor is shown based on both "showUploadEditor" (set in the
store) and "modalDismissed" (set in the component). As "modalDismissed"
is initially false and "showUploadEditor" was not cleared after an
upload started or was discarded this caused the upload editor to be
immediately shown if mounted again (for example, when joining a
conversation in the Files app sidebar) if a previous upload was
initialised.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
As "showUploadEditor" is now properly updated in the store when an
upload starts or discarded the "modalDismissed" property of the
component is redundant and can be removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
As "showUploadEditor" is true only when "currentUploadId" is set and
false otherwise there is no need to use a separate variable.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@PVince81
Copy link
Member

PVince81 commented Feb 9, 2021

rebased

@PVince81 PVince81 force-pushed the add-upload-editor-in-files-sidebar-mode branch from 2c96454 to 1c70320 Compare February 9, 2021 08:36
@PVince81 PVince81 self-assigned this Feb 9, 2021
@PVince81
Copy link
Member

PVince81 commented Feb 9, 2021

the chat tab is empty for the second file

here after rebase not happening any more, it was likely the bug we already fixed (somehow I can't find the PR any more)

however the upload dialog doesn't appear after selecting files in the file picker

@PVince81
Copy link
Member

PVince81 commented Feb 9, 2021

I've re-tried this and the upload dialog seems to work now. Maybe I had some caching issues.

@PVince81 PVince81 marked this pull request as ready for review February 9, 2021 16:37
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍 tested both in sidebar mode and regular mode, upload works

@PVince81 PVince81 merged commit 1ad9f58 into master Feb 9, 2021
@PVince81 PVince81 deleted the add-upload-editor-in-files-sidebar-mode branch February 9, 2021 16:37
@PVince81
Copy link
Member

PVince81 commented Feb 9, 2021

/backport to stable21

@PVince81
Copy link
Member

PVince81 commented Feb 9, 2021

/backport to stable20.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing bug feature: talk-sidebar ⬅️ Sidebar integration of Talk into other apps like sharing and documents regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants