Skip to content

Conversation

@Kodecheff
Copy link

@Kodecheff Kodecheff commented Mar 21, 2023

Fixes #285


function adwBanner() {
// Create a new AdwBanner widget
const banner = new Adw.Banner({
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to #248

please create the banner from the blueprint

Copy link
Contributor

Choose a reason for hiding this comment

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

Since these are generally intended to be place in a window, directly under the header bar, it would be a good idea to create a small window to demonstrate this, too.

The button in Workbench could pop up a window, and contain a few widget to control the info bar's properties.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with Andy, the Banner should be in a Window.

No need for a custom button to open the window though - Workbench will directly offer the option if it detects a Window in the Blueprint. Similar to the "Window" library entry.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, the libadwaita demo doesn't use an external banner for its demo – I think it's safe to follow them and makes the demo visible immediately.

image

works for you @andyholmes ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's good too. I think the important part is that it doesn't have margins on the top or left/right sides.

Replicating the libadwaita demo is good idea in general I think.

@sonnyp sonnyp removed the request for review from andyholmes March 26, 2023 12:13
@sonnyp sonnyp assigned sonnyp and unassigned andyholmes Mar 26, 2023
Copy link
Contributor

@andyholmes andyholmes left a comment

Choose a reason for hiding this comment

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

Looking better!

Be sure to mark all user-visible strings in the .js and .blp file as translatable, by putting them in the gettext function, like _("Words to translate").

Comment on lines +26 to +32
Adw.Banner banner{
button-label: "Troubleshoot";
title: "An error occurred: Could not resolve host.";
revealed: true;
use-markup: true;
margin-bottom: 20;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is better, but the banner should really be up at the top of the window, with no margins, right under the header bar.

Then maybe make it so clicking "Troubleshoot" hides the banner and shows the toast. Where the banner is now, add a button so the banner can be re-opened.

Adw.ToastOverlay overlay {
Adw.StatusPage {
title: "Adw Banner";
description: "Gnome Banner Test";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: "Gnome Banner Test";
description: "GNOME Banner Test";

@sonnyp sonnyp assigned andyholmes and unassigned sonnyp Apr 1, 2023
@sonnyp sonnyp force-pushed the main branch 3 times, most recently from 05f69f1 to 55e450f Compare May 21, 2023 10:37
@sonnyp
Copy link
Contributor

sonnyp commented May 28, 2023

hey @Kodecheff, do you want to finish this? If so, make sure to add your name to the list of contributors in about.js

@sonnyp sonnyp assigned Kodecheff and unassigned andyholmes May 28, 2023
@sonnyp sonnyp mentioned this pull request Jun 10, 2023
@sonnyp
Copy link
Contributor

sonnyp commented Jun 15, 2023

#313

@sonnyp sonnyp closed this Jun 15, 2023
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.

adw banner

3 participants