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

Bring new modal component #3378

Merged
merged 2 commits into from
Jun 2, 2020
Merged

Bring new modal component #3378

merged 2 commits into from
Jun 2, 2020

Conversation

LukasHirt
Copy link
Contributor

@LukasHirt LukasHirt commented Apr 24, 2020

Related Issue

How Has This Been Tested?

  • test environment: drone

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Open tasks:

  • Acceptance tests
  • Changelog
  • Transition
  • Update ODS
  • Merge new sidebar and rebase

@update-docs
Copy link

update-docs bot commented Apr 24, 2020

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@LukasHirt LukasHirt force-pushed the feature/bring-new-modal branch 4 times, most recently from a9ae7f5 to 0b53edb Compare May 13, 2020 10:24
@LukasHirt LukasHirt added Category:Enhancement Add new functionality and removed Status:In-Progress labels May 13, 2020
@LukasHirt LukasHirt marked this pull request as ready for review May 13, 2020 10:24
@LukasHirt LukasHirt added this to In progress in oCIS Sprint 20-9&10 via automation May 13, 2020
@LukasHirt LukasHirt moved this from In progress to To review in oCIS Sprint 20-9&10 May 13, 2020
@kulmann
Copy link
Member

kulmann commented May 13, 2020

A few things I noticed during local test in Chrome:

  • sidebar needs to be merged first (see screenshot)
    Screenshot 2020-05-13 at 13 33 37

  • error messages below the input are gone (see screenshot)
    Screenshot 2020-05-13 at 13 33 49

  • delete prompt shows a text input for creating a new folder if that input prompt was opened before (page reload fixes that, so that is might be a keying issue), see screenshot
    Screenshot 2020-05-13 at 13 35 04

  • when entering something into the input from the issue above, hitting cancel in the danger modal triggers the confirm action, so that file/folder gets deleted although I clicked on cancel. this only happens, if something was entered in the input. If the input is unchanged, the modal behaves correctly on cancel.

@kulmann
Copy link
Member

kulmann commented May 13, 2020

I added merging the sidebar PR to the list of things to be done in your issue description. Hope you don't mind me editing there.

@LukasHirt
Copy link
Contributor Author

I added merging the sidebar PR to the list of things to be done in your issue description. Hope you don't mind me editing there.

Not at all, thank you!

@LukasHirt
Copy link
Contributor Author

I checked the error message and it seems to work fine for me. The console also not logging any error related to it.

image

image

@LukasHirt
Copy link
Contributor Author

when entering something into the input from the issue above, hitting cancel in the danger modal triggers the confirm action, so that file/folder gets deleted although I clicked on cancel. this only happens, if something was entered in the input. If the input is unchanged, the modal behaves correctly on cancel.

That is really weird. Happens even in the other dialogs e.g. create

@LukasHirt
Copy link
Contributor Author

delete prompt shows a text input for creating a new folder if that input prompt was opened before (page reload fixes that, so that is might be a keying issue), see screenshot

Should be fixed now. I didn't properly handle going back to default values in the state.

@LukasHirt
Copy link
Contributor Author

Requires ODS update after merging owncloud/owncloud-design-system#768 and owncloud/owncloud-design-system#769

@LukasHirt LukasHirt added this to In progress in oCIS Sprint 20-11 via automation May 26, 2020
@LukasHirt
Copy link
Contributor Author

Rebased and ODS updated. The cancel which triggered confirm is fixed now.


let isPopupVisible = false

/* issue: https://github.com/owncloud/phoenix/issues/1728
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This issue should be fixed so there is no need for this workaround anymore.

@LukasHirt
Copy link
Contributor Author

Hmm, there are still two failing tests. Both failing when comparing the content of a file which has been upload by overwriting the original one. Locally those tests pass though. I'll try some more digging in the morning.

@LukasHirt LukasHirt force-pushed the feature/bring-new-modal branch 2 times, most recently from 0834ff7 to df0b004 Compare May 28, 2020 08:53
@LukasHirt
Copy link
Contributor Author

I cannot figure out why is it failing. The exact same scenario which fails here passes locally. Even tried logging the content of files and it is successfully overwritten. And watching it in VNC viewer also seems that everything is ok, the modal gets displayed and confirmed, the file gets uploaded...

@LukasHirt
Copy link
Contributor Author

LukasHirt commented May 28, 2020

@individual-it Could maybe someone from your team take a look at why tests are passing locally but not in CI? I'm probably looking at this already too long and am overlooking something obvious 🤢

@LukasHirt LukasHirt moved this from In progress to Blocked in oCIS Sprint 20-11 May 28, 2020
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

One thing that I was thinking about, is, how we want to center the modal. At the moment it's centered in the viewport. It could be a good idea to center it in the extension content area (meaning, offset by the width of the left sidebar, if it is visible). Open for discussion, should not be part of this PR imo.

@@ -99,8 +70,7 @@ export default {
fileName: '',
selected: [],
breadcrumbs: [],
self: {},
renameDialogErrorMessage: null
self: {}
Copy link
Member

Choose a reason for hiding this comment

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

Please also remove self here. It is unused and should not be part of data anyway.

? this.$gettext(
'Are you sure you want to delete all selected resources? All their content will be permanently removed. This action cannot be undone.'
)
: this.$gettext('Are you sure you want to delete all selected resources')
Copy link
Member

Choose a reason for hiding this comment

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

Message misses a question mark at the end

oCIS Sprint 20-11 automation moved this from Blocked to To review May 28, 2020
@kiranparajuli589 kiranparajuli589 self-assigned this May 29, 2020
@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented May 29, 2020

@LukasHirt I think the upload is not successful. see last line of browser log at https://drone.owncloud.com/owncloud/phoenix/9884/25/19

9:40:21 AM - SEVERE - http://owncloud/remote.php/dav/public-files/IfKFn6NdAJO3Bbj/lorem.txt - Failed to load resource: the server responded with a status of 500 (Internal Server Error) | 229s
504

Server log at that timestamp:

{"reqId":"ae902097-25e9-492b-b884-708e1cff0cbe",
"level":3,
"time":"2020-05-29T09:40:21+00:00",
"remoteAddr":"172.20.0.3",
"user":"--",
"app":"webdav",
"method":"PUT",
"url":"\/remote.php\/dav\/public-files\/IfKFn6NdAJO3Bbj\/lorem.txt",
"message":"Caused by: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\Forbidden\",\"Message\":\"Permission denied to create file\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1091): OCA\\\\DAV\\\\Files\\\\PublicFiles\\\\PublicSharedRootNode->createFile('lorem.txt', Resource id #14)\\n#1 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(504): Sabre\\\\DAV\\\\Server->createFile('public-files\\\/If...', Resource id #14, NULL)\\n#2 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(470): Sabre\\\\DAV\\\\Server->emit('method:PUT', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(251): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/Server.php(329): Sabre\\\\DAV\\\\Server->start()\\n#6 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/owncloud\\\/server\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/Files\\\/PublicFiles\\\/PublicSharedRootNode.php\",\"Line\":127}"}

PS: phoenix is setup in CI using bridge https://owncloud.github.io/ocis/bridge/, that might be the reason of different behavior in CI and local setup.

@kiranparajuli589 kiranparajuli589 removed their assignment Jun 1, 2020
@kiranparajuli589 kiranparajuli589 merged commit 20c4c98 into master Jun 2, 2020
oCIS Sprint 20-11 automation moved this from To review to Done Jun 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the feature/bring-new-modal branch June 2, 2020 03:29
@pascalwengerter pascalwengerter mentioned this pull request Jun 15, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality QA:team
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants