[Launchpad-reviewers] [Merge] ~xnox/launchpad:snap-request-builds-mimick-auto into launchpad:master

2024-01-11 Thread Dimitri John Ledkov
The proposal to merge ~xnox/launchpad:snap-request-builds-mimick-auto into 
launchpad:master has been updated.

Commit message changed to:

snappy: Make requestbuild use auto-build archive and pocket defaults

Make request snap builds page for a snap, reuse auto-build archive & pocket, if 
set on the snap.

Rationale:
* Currently many snap builds are only correct, or successful if they use a 
predetermined set of snap recipe configuration. For example - beta channel 
recipe, uses beta PPA archive to pull in relevant beta .deb dependencies. Or 
for example use special forked dependencies from a given private archive (for 
pre-release or edge builds). Especially when such archives cannot be encoded in 
the snapcraft.yaml (as they are either private, or need to be dynamically 
updated to one of multiple valid options, depending on upload target).
* Auto-builds are able to correctly set desired auto-build archive, and it is 
correctly used
* When triggering a manual build, currently the default auto-build settings are 
not used. Meaning one has to carefully inspect snap recipe auto-build settings 
and lookup matching build archive and set it on the request snap build page to 
ensure the manual triggered build is done the same way as the automatically 
triggered one
* Fix this UI/UX issue by pre-populating manually triggered build, with the 
same defaults that automaticly triggered builds use. Such that for example the 
same build archive is used.

QAStaging test case:
* Create snap recipe
* Set it to autobuild
* Set a PPA archive for autobuilds
* Click Requests Builds
* The UI page of requests builds should have the same autobuild PPA prepulated 
and selected

LP: #2028687

For more details, see:
https://code.launchpad.net/~xnox/launchpad/+git/launchpad/+merge/447665
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~xnox/launchpad:snap-request-builds-mimick-auto into launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~xnox/launchpad:snap-request-builds-mimick-auto into launchpad:master

2024-01-11 Thread Dimitri John Ledkov
Updated rationale and qastaging test case
-- 
https://code.launchpad.net/~xnox/launchpad/+git/launchpad/+merge/447665
Your team Launchpad code reviewers is requested to review the proposed merge of 
~xnox/launchpad:snap-request-builds-mimick-auto into launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:social-accounts-ui-display-accounts into launchpad:master

2024-01-11 Thread Simone Pelosi



Diff comments:

> diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
> index eb5cad2..862c0bb 100644
> --- a/lib/lp/app/browser/tales.py
> +++ b/lib/lp/app/browser/tales.py
> @@ -3049,3 +3050,27 @@ class IRCNicknameFormatterAPI(ObjectFormatterAPI):
>  self._context.nickname,
>  self._context.network,
>  ).escapedtext
> +
> +
> +@implementer(ITraversable)
> +class SocialAccountFormatterAPI(ObjectFormatterAPI):
> +"""Adapter from social account objects to a formatted string."""
> +
> +traversable_names = {
> +"formatted_displayname": "formatted_displayname",
> +}
> +
> +def formatted_displayname(self, view_name=None):
> +if self._context.platform == SocialPlatform.MATRIX:
> +nickname = self._context.identity.get("nickname")
> +network = self._context.identity.get("network")

Does it make sense here to check if nickname and network are != None ?

> +return structured(
> +dedent(
> +f"""\
> +{nickname}
> + on 
> +{network}
> +"""
> +),
> +).escapedtext
> +return None
> diff --git a/lib/lp/registry/templates/person-portlet-contact-details.pt 
> b/lib/lp/registry/templates/person-portlet-contact-details.pt
> index 9a45fd4..720415d 100644
> --- a/lib/lp/registry/templates/person-portlet-contact-details.pt
> +++ b/lib/lp/registry/templates/person-portlet-contact-details.pt
> @@ -200,6 +172,46 @@
>  
>
>  
> +  
> +  Social Accounts

I tested the UI locally and `Social Accounts` headers seems to get lost a bit 
among other headers and titles, is there a way to make it more prominent?

> +
> +  IRC:
> +
> +
> +  
> +
> +  
> +  
> +No IRC nicknames registered.
> +  
> +
> +
> +
> +  Jabber:
> +
> +  
> +  
> +
> +   +/>,
> +
> +
> +  No Jabber IDs registered.
> +
> +  
> +
> +
> + id="matrix-accounts">
> +  Matrix:
> +  
> +
> +  
> +  
> +No Matrix accounts registered.
> +  
> +
> +  
> +
>  
>  
>  


-- 
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/458449
Your team Launchpad code reviewers is requested to review the proposed merge of 
~ines-almeida/launchpad:social-accounts-ui-display-accounts into 
launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:social-accounts-ui-display-accounts into launchpad:master

2024-01-11 Thread Ines Almeida



Diff comments:

> diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
> index eb5cad2..862c0bb 100644
> --- a/lib/lp/app/browser/tales.py
> +++ b/lib/lp/app/browser/tales.py
> @@ -3049,3 +3050,27 @@ class IRCNicknameFormatterAPI(ObjectFormatterAPI):
>  self._context.nickname,
>  self._context.network,
>  ).escapedtext
> +
> +
> +@implementer(ITraversable)
> +class SocialAccountFormatterAPI(ObjectFormatterAPI):
> +"""Adapter from social account objects to a formatted string."""
> +
> +traversable_names = {
> +"formatted_displayname": "formatted_displayname",
> +}
> +
> +def formatted_displayname(self, view_name=None):
> +if self._context.platform == SocialPlatform.MATRIX:
> +nickname = self._context.identity.get("nickname")
> +network = self._context.identity.get("network")

Yeah, I was also thinking of that, but I wasn't sure whether to throw an error, 
display nothing, or something in between. I went for the in-between: it will 
display as "Error" text in the page.

We will be in control of the JSON format, so this should hopefully not be an 
issue, but better prepare for it

> +return structured(
> +dedent(
> +f"""\
> +{nickname}
> + on 
> +{network}
> +"""
> +),
> +).escapedtext
> +return None
> diff --git a/lib/lp/registry/templates/person-portlet-contact-details.pt 
> b/lib/lp/registry/templates/person-portlet-contact-details.pt
> index 9a45fd4..720415d 100644
> --- a/lib/lp/registry/templates/person-portlet-contact-details.pt
> +++ b/lib/lp/registry/templates/person-portlet-contact-details.pt
> @@ -200,6 +172,46 @@
>  
>
>  
> +  
> +  Social Accounts

Sure, I can make it a h2!

> +
> +  IRC:
> +
> +
> +  
> +
> +  
> +  
> +No IRC nicknames registered.
> +  
> +
> +
> +
> +  Jabber:
> +
> +  
> +  
> +
> +   +/>,
> +
> +
> +  No Jabber IDs registered.
> +
> +  
> +
> +
> + id="matrix-accounts">
> +  Matrix:
> +  
> +
> +  
> +  
> +No Matrix accounts registered.
> +  
> +
> +  
> +
>  
>  
>  


-- 
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/458449
Your team Launchpad code reviewers is requested to review the proposed merge of 
~ines-almeida/launchpad:social-accounts-ui-display-accounts into 
launchpad:master.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp