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

Migrate to new libadwaita Adaptive Dialogs #95

Merged
merged 7 commits into from
Feb 5, 2024

Conversation

sungsphinx
Copy link
Contributor

@sungsphinx sungsphinx commented Feb 3, 2024

Copy link
Owner

@vixalien vixalien left a comment

Choose a reason for hiding this comment

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

Can you rename this to "feat: change window min height and width"

And please say why this is necessary in the commit message.

@sungsphinx
Copy link
Contributor Author

sungsphinx commented Feb 3, 2024

Can you rename this to "feat: change window min height and width"

And please say why this is necessary in the commit message.

Done (hopefully)

@vixalien

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

From the Human Interface Design Guidelines:

Apps that are appropriate for a phone form factor should scale down to 360×294px.

https://developer.gnome.org/hig/guidelines/adaptive.html

@sungsphinx
Copy link
Contributor Author

From the Human Interface Design Guidelines:

Apps that are appropriate for a phone form factor should scale down to 360×294px.

https://developer.gnome.org/hig/guidelines/adaptive.html

Screencast.from.2024-02-04.12-05-13.webm

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

Those errors are possibly from other screens having a conflicting default height. I'd recommend looking into that instead..

@sungsphinx
Copy link
Contributor Author

sungsphinx commented Feb 4, 2024

Those errors are possibly from other screens having a conflicting default height. I'd recommend looking into that instead..

so should I change the height to the HIG one then?

it seems to break and not show some stuff at the bottom when that small.

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

Yes. Will need to investigate further.

@sungsphinx
Copy link
Contributor Author

sungsphinx commented Feb 4, 2024

Yes. Will need to investigate further.

Done, is this good for a re-review now? @vixalien

@sungsphinx
Copy link
Contributor Author

image
@vixalien looks better now, I also saw some suggested changes that disappeared, should I do those?

@@ -140,4 +140,4 @@ export class Application extends Adw.Application {

export function get_player() {
return (Gtk.Application.get_default() as Application).player;
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

can you please re-add the whitespace at the end of this file?

make sure to do so in this same commit (i.e don't add another fixup commit)

Copy link
Owner

Choose a reason for hiding this comment

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

You didn't resolve this either..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vixalien must have not pushed correctly... Could you fix these?

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah, git can get finnicky sometimes. I will try to fix these tomorrow. Have a great night.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, git can get finnicky sometimes. I will try to fix these tomorrow. Have a great night.

Thanks, you too!

src/application.ts Outdated Show resolved Hide resolved
this.preferences_window.set_transient_for(this.get_active_window());
if (!this.preferences_dialog) {
this.preferences_dialog = new MuzikaPreferencesDialog();
//this.preferences_dialog.set_transient_for(this.get_active_window());
Copy link
Owner

Choose a reason for hiding this comment

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

remove this comment as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can mark this as resolved now.

data/ui/pages/preferences.blp Outdated Show resolved Hide resolved
data/ui/pages/preferences.blp Show resolved Hide resolved
@@ -170,7 +170,6 @@ export class PlaylistPage extends Adw.Bin
if (this.playlist?.editable !== true) return;

const dialog = Adw.MessageDialog.new(
Copy link
Owner

Choose a reason for hiding this comment

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

Should this be an Adw.AlertDialog?

Copy link
Owner

Choose a reason for hiding this comment

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

You didn't actually change this..

be careful when you mark conversations as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weird... I did change it...

data/ui/components/playlist/edit.blp Outdated Show resolved Hide resolved
data/ui/components/playlist/edit.blp Outdated Show resolved Hide resolved
src/pages/playlist.ts Outdated Show resolved Hide resolved
@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

Whew... finaly reviewed this. Check the requested changes, and don't hesitate to ask me in case of doubt.

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

@vixalien looks better now, I also saw some suggested changes that disappeared, should I do those?

Oops sorry... I was trying to do a review, but failed. You can see the suggested changes again now.

Also, you can review the commits I made and let me know if all is okay.

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

Note to self: reorder commits before merging

@sungsphinx
Copy link
Contributor Author

@vixalien re-review? 😅

@sungsphinx
Copy link
Contributor Author

Also, you can review the commits I made and let me know if all is okay.

They seem fine, no problems here!

src/window.ts Outdated
page.set_modal(true);
page.set_transient_for(this);
page.present();
//page.set_modal(true);
Copy link
Owner

Choose a reason for hiding this comment

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

remove these comments too

default-width: 360;
default-height: 440;
content-width: 360;
content-height: 440;
Copy link
Owner

Choose a reason for hiding this comment

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

remove the content-height, it's unnecessary

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

please pull this branch beforehand, as I just made some changes

@sungsphinx
Copy link
Contributor Author

Hi, I'm currently not at my computer right now, so I can't do too much.

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

Hey there! I see a bit of the changes I requested were just marked as resolved without first implementing them, which is problematic. A few of the comments I requested to be removed are still there, as well as some newlines at the end of the file..

Please review each change request carefully and update the relevant commit (you don't need to add extra commits) and re-request a review when done. Thanks and have a great day.

@vixalien vixalien marked this pull request as draft February 4, 2024 21:37
@vixalien vixalien changed the title [2nd Take] feat: Port Dialogs and Popup Windows to Adw.Dialog Migrate to new libadwaita Adaptive Dialogs Feb 4, 2024
@sungsphinx
Copy link
Contributor Author

Hey there! I see a bit of the changes I requested were just marked as resolved without first implementing them, which is problematic. A few of the comments I requested to be removed are still there, as well as some newlines at the end of the file..

Please review each change request carefully and update the relevant commit (you don't need to add extra commits) and re-request a review when done. Thanks and have a great day.

I think something weird happened with git, I did those changes and pushed...

@vixalien
Copy link
Owner

vixalien commented Feb 4, 2024

Then I think there might be an issue on my end. Let me recheck

@vixalien vixalien mentioned this pull request Feb 4, 2024
12 tasks
Reason for width change: bottom sheets cut off to the right with the
width under 360

Reason for height change: be in line with the GNOME HIG
(https://developer.gnome.org/hig/guidelines/adaptive.html#small-size-handling)
@vixalien vixalien force-pushed the sungsphinx/adw-dialog-v2 branch 3 times, most recently from f1694f3 to fa34c5d Compare February 5, 2024 13:22
@vixalien
Copy link
Owner

vixalien commented Feb 5, 2024

Okay! I fixed the various issues and used the Adw.AlertDialog.choose API. I would appreciate if you would test and review this before I merge it.

sungsphinx and others added 6 commits February 5, 2024 15:26
@vixalien vixalien marked this pull request as ready for review February 5, 2024 13:34
@sungsphinx
Copy link
Contributor Author

Okay! I fixed the various issues and used the Adw.AlertDialog.choose API. I would appreciate if you would test and review this before I merge it.

Thank you, will do.

@sungsphinx
Copy link
Contributor Author

Okay! I fixed the various issues and used the Adw.AlertDialog.choose API. I would appreciate if you would test and review this before I merge it.

Thank you, will do.

Playlists seem to work fine (also tested the delete dialog, the playlist doesn't disappear, this might just be an unrelated issue though).
image

Edit Dialog:
image

About Dialog:
image

Preferences Dialog:
image

Will update if I encounter anything.

@vixalien

@sungsphinx
Copy link
Contributor Author

sungsphinx commented Feb 5, 2024

Is this ready yet?

@vixalien
Copy link
Owner

vixalien commented Feb 5, 2024

Yes it's ready.

@vixalien vixalien merged commit ea1e02e into vixalien:main Feb 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants