Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Moved content picker into a popover #414

Open
wants to merge 4 commits into
base: xenial
Choose a base branch
from

Conversation

kugiigi
Copy link
Contributor

@kugiigi kugiigi commented Dec 2, 2020

Originally from #336

  • Put the content picker when opening downloads into a popup for a more "convergent" design.
  • Also moved here the open in browser action buttons

@kugiigi kugiigi force-pushed the xenial_-_contentpicker branch from 3f68991 to 2d99be1 Compare December 17, 2020 18:52
@kugiigi kugiigi mentioned this pull request Feb 2, 2021
Copy link
Member

@UniversalSuperBox UniversalSuperBox left a comment

Choose a reason for hiding this comment

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

This appears to introduce a warning when the content picker is opened by tapping on a download:

file:///usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Content/ContentPeerPicker13.qml:196: TypeError: Type error

We should investigate why this happens, and if possible fix it, before merging.

@kugiigi kugiigi force-pushed the xenial_-_contentpicker branch from a3e458d to 0fe15d9 Compare February 4, 2021 14:28
@kugiigi
Copy link
Contributor Author

kugiigi commented Feb 4, 2021

This appears to introduce a warning when the content picker is opened by tapping on a download:

file:///usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Content/ContentPeerPicker13.qml:196: TypeError: Type error

We should investigate why this happens, and if possible fix it, before merging.

I can't find exactly what's causing the error so I decided to just fix those annoying TypeError errors in content hub 😀
ubports/content-hub#17

I've also rebased it and fixed the conflicts. I also enabled the commented out codes for opening files from the downloads dialog.
I hope it's fine otherwise, sorry 😅

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2016 Canonical Ltd.
* Copyright 2021 UBports Foundation
Copy link
Member

Choose a reason for hiding this comment

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

Whoops... In this case, both copyright statements would be kept. The code was under copyright by Canonical, and now we've added some stake with our changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, that file was created in #415
i actually noticed that there are a few others that we missed in that PR 😅
I'm planning to correct them in a separate PR but I just corrected this one here since I modified it anyway.

But this is definitely a lesson learned for me moving forward - don't just copy paste copyright texts 😀

@kugiigi
Copy link
Contributor Author

kugiigi commented Mar 27, 2021

I changed the dialog from UITK to QQC2 since it's more flexible with placement and sizing.
And it also fixes the issue with UITK popup's visibility and avoid the crash issue on specific scaling (#311)

This also sets the qt version to 5.12 because it was needed to set the dimming background of the popup.

@UniversalSuperBox
Copy link
Member

Here is a preview of this change at different scale levels

OnePlus One portrait
image

OnePlus One landscape
image

Nexus 7 portrait
image

Nexus 7 landscape
image

Nexus 7 windowed (default scaling)
image

Nexus 7 windowed (small scaling)
image

@cibersheep
Copy link
Contributor

Oh. This is a improvement.
Is nice to have the filename in the header and that the header takes less space.

I see the dialog on portrait is anchored to the bottom. They should center vertically as well.

Question (out of curiosity): Why did you choose a Dialog instead of a Page?
Question (might be off topic): What's the difference between the header actions folder and external link? The file is open in the browser whatever I choose.

@kugiigi
Copy link
Contributor Author

kugiigi commented May 18, 2021

I see the dialog on portrait is anchored to the bottom. They should center vertically as well.

I can't remember exactly the logic when it anchors at the bottom but I think it only happens at certain height and width and not just when in portrait. Otherwise, the dialog is centered (see last picture). I designed it like that so that it's easily reachable. It's a bit similar with android's dialog when opening a file or an intent.

Question (out of curiosity): Why did you choose a Dialog instead of a Page?

A dialog can be positioned more freely and can be designed with convergence in mind. The content picker doesn't need to be always displayed full especially on large screens.

Question (might be off topic): What's the difference between the header actions folder and external link? The file is open in the browser whatever I choose

These are existing actions that were not implemented on this PR. In my understanding, one opens the local copy of the file in the browser while the other opens the original dowload link of the file.

@cibersheep
Copy link
Contributor

I see the dialog on portrait is anchored to the bottom. They should center vertically as well.

I can't remember exactly the logic when it anchors at the bottom but I think it only happens at certain height and width and not just when in portrait. Otherwise, the dialog is centered (see last picture). I designed it like that so that it's easily reachable. It's a bit similar with android's dialog when opening a file or an intent.

Dialogs in UT are centered horizontally and vertically. Moprh being a core app should follow the same UI design.

Thanks for the other answers :)

@kugiigi
Copy link
Contributor Author

kugiigi commented May 19, 2021

Then maybe we should change that design 😝
I'll change this when I get the time. Unforetunately, I'm not sure when that would be 😅

@kugiigi
Copy link
Contributor Author

kugiigi commented Jul 15, 2021

I've changed the behavior of the popup. It's now full screen for most phones, not anchored at the bottom.

@cibersheep
Copy link
Contributor

There is a dancing sheep somewhere :)

@Fuseteam
Copy link

what is blocking this PR :3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants