Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
I pushed a few new commits after the demo this morning: - The CSS file is now hosted locally - Small update to the style of items in Launchpad - Updates the icon colors slightly and added a new icon - Updates the 'Launchpad' and 'Get Started' sections (see screenshots below) Logged out: https://pasteboard.co/SgtcNkGLevV0.png Logged in: https://pasteboard.co/j3yJPECBjUZY.png -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
Ines Almeida has proposed merging ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. Commit message: ui: Launchpad homepage revamp - Imported Vanilla framework directly to the homepage - Re-organized homepage sections and reworked them using Vanilla components - Cleaned up CSS styling and page views that are no longer used Requested reviews: Launchpad code reviewers (launchpad-reviewers) Peter Makowski (petermakowski): code For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Initial stab at making Launchpad's homepage a little bit more modern -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. diff --git a/lib/canonical/launchpad/icing/css/components/_index.scss b/lib/canonical/launchpad/icing/css/components/_index.scss index 59e25ed..057da90 100644 --- a/lib/canonical/launchpad/icing/css/components/_index.scss +++ b/lib/canonical/launchpad/icing/css/components/_index.scss @@ -1,6 +1,7 @@ @import 'access_tokens', 'batch_navigation', 'bug_picker', +'homepage', 'profiling_info', 'sidebar_portlets', 'bug_listing', diff --git a/lib/canonical/launchpad/icing/css/components/homepage.scss b/lib/canonical/launchpad/icing/css/components/homepage.scss new file mode 100644 index 000..17b63cc --- /dev/null +++ b/lib/canonical/launchpad/icing/css/components/homepage.scss @@ -0,0 +1,18 @@ +.homepage { +margin: auto; +width: 90%; +max-width: 80em; +} + +// Make search box wide +#homepage-searchform { +width: 100%; + +.p-form__group { +flex-grow: 1; +} + +.p-form__control { +width: 100%; +} +} diff --git a/lib/canonical/launchpad/images/add-homepage.png b/lib/canonical/launchpad/images/add-homepage.png new file mode 100644 index 000..0cd9f6f Binary files /dev/null and b/lib/canonical/launchpad/images/add-homepage.png differ diff --git a/lib/canonical/launchpad/images/bug-homepage.png b/lib/canonical/launchpad/images/bug-homepage.png new file mode 100644 index 000..3599ff9 Binary files /dev/null and b/lib/canonical/launchpad/images/bug-homepage.png differ diff --git a/lib/canonical/launchpad/images/ppa-icon-homepage.png b/lib/canonical/launchpad/images/ppa-icon-homepage.png new file mode 100644 index 000..f6f529c Binary files /dev/null and b/lib/canonical/launchpad/images/ppa-icon-homepage.png differ diff --git a/lib/canonical/launchpad/images/question-homepage.png b/lib/canonical/launchpad/images/question-homepage.png new file mode 100644 index 000..f43e96f Binary files /dev/null and b/lib/canonical/launchpad/images/question-homepage.png differ diff --git a/lib/canonical/launchpad/images/translation-homepage.png b/lib/canonical/launchpad/images/translation-homepage.png new file mode 100644 index 000..6988a2b Binary files /dev/null and b/lib/canonical/launchpad/images/translation-homepage.png differ diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py index c91b890..d6b2760 100644 --- a/lib/lp/app/browser/tales.py +++ b/lib/lp/app/browser/tales.py @@ -826,11 +826,10 @@ class ObjectImageDisplayAPI: # XXX: this should go away as soon as all image:icon where replaced return None -def logo(self): -"""Return the appropriate tag for this object's logo. +def logo_src(self): +"""Return the appropriate src attribute for this object's logo. -:return: A string, or None if the context object doesn't have -a logo. +:return: A string, or None if the context object doesn't have a logo. """ context = self._context if not IHasLogo.providedBy(context): @@ -843,10 +842,18 @@ class ObjectImageDisplayAPI: url = context.logo.getURL() else: url = self.default_logo_resource(context) -if url is None: -# We want to indicate that there is no logo for this -# object. -return None +return url + +def logo(self): +"""Return the appropriate tag for this object's logo. + +:return: A string, or None if the context object doesn't have a logo. +""" +url = self.logo_src() +if url is None: +# We want to indicate that there is no logo for this +# object. +return None logo = '' return logo % url diff --git a/lib/lp/app/templates/root-index.pt b/lib/lp/app/templates/root-index.pt index ee51d55..16eae94 100644 --- a/lib/lp/app/templates/root-index.pt +++ b/lib/lp/app/templates/root-index.pt @@ -6,48 +6,7 @@ metal:use-macro="view/macro:page/main_only" i18n:domain="launchpad"> - - .homepage { - margin: auto; -
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
The proposal to merge ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project has been updated. Status: Needs review => Work in progress For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
Thank you all for the comments! @petermakowski Regarding impact on SEO, I ran lighthouse in the master branch and this one and the scores are exactly identical (unfortunately, not incredibly high). For reference, the scores were: - Performance: 36 - Accessibility: 76 - Best pratices: 68 - SEO: 67 Diff comments: > diff --git a/lib/canonical/launchpad/icing/css/components/homepage.scss > b/lib/canonical/launchpad/icing/css/components/homepage.scss > new file mode 100644 > index 000..17b63cc > --- /dev/null > +++ b/lib/canonical/launchpad/icing/css/components/homepage.scss > @@ -0,0 +1,18 @@ > +.homepage { Thank you for the tip! I tried it and found a bit uncanny the change from `max-width: 80em` to `max-width: 80rem` (set by "u-fixed-width"). I think I prefer the keep the status-quo a little bit here and do changes more gradually perhaps. > +margin: auto; > +width: 90%; > +max-width: 80em; > +} > + > +// Make search box wide > +#homepage-searchform { > +width: 100%; > + > +.p-form__group { > +flex-grow: 1; > +} > + > +.p-form__control { > +width: 100%; > +} > +} > diff --git a/lib/lp/app/templates/root-index.pt > b/lib/lp/app/templates/root-index.pt > index ee51d55..2a6ffcf 100644 > --- a/lib/lp/app/templates/root-index.pt > +++ b/lib/lp/app/templates/root-index.pt > @@ -6,48 +6,7 @@ >metal:use-macro="view/macro:page/main_only" >i18n:domain="launchpad"> > > - > - .homepage { > - margin: auto; > - width: 90%; > - max-width: 80em; > - } > - #homepage-whatslaunchpad ul { > - margin-left: 1em; > - margin-bottom: 0.5em; > - } > - #homepage-whatslaunchpad ul, > - #homepage-whatslaunchpad-tour { > - font-weight: bold; > - } > - #homepage-stats { > - max-width: 50em; > - margin: auto; > - padding-top: 0.5em; > - color: gray; > - } > - #homepage-blogposts { > - padding-right: 4em; > - } > - #homepage-getstarted ul { > - padding-top: 0.5em; > - } > - .featured-project-top h3 { > - font-weight: bold; > - } > - .featured-project-top h3 img { > - vertical-align: middle; > - } > - .featured-project-top p { > - margin-top: 0.5em; > - margin-bottom: 1em; > - padding-bottom: .5em; > - border-bottom: 1px dotted #999; > - } > - #launchpad-logo-and-name { > - width: 250px; > - } > - > + href="https://assets.ubuntu.com/v1/vanilla-framework-version-4.7.0.min.css; /> I hear ya. But I feel like dumping the CSS static files directly is hacky, and setting it up as a yarn dependency and compiling it ourselves to build the CSS separately from the rest of our styles (since this is only used in the homepage) is a big overkill for this task IMO. On another note, IIRC in previous conversations (particularly, in a meeting about adding syntax highlight) it was mentioned as OK to import assets directly from assets.ubuntu.com, since it's maintained by Canonical. > > > > @@ -67,90 +26,26 @@ > style="margin: 0 9em 1em 0"/> > > > - > - > - - tal:condition="view/show_whatslaunchpad"> > - Launchpad is a > software collaboration platform that provides: > - > - > - - tal:attributes="href apphomes/bugs">Bug tracking > - > - > - - tal:attributes="href apphomes/code">Code hosting > -using http://bazaar.canonical.com/;>Bazaar > -and https://git-scm.com/;>Git > - > - > - - href="https://help.launchpad.net/Code/Review;>Code > reviews > - > - > - - tal:attributes="href apphomes/ubuntu">Ubuntu package > building and hosting > - > - > - - tal:attributes="href > apphomes/translations">Translations > - > - > - - > href="https://help.launchpad.net/Teams/MailingLists;>Mailing lists > - > - > - - tal:attributes="href apphomes/answers">Answer tracking and > FAQs > - > - > - - tal:attributes="href apphomes/blueprints">Specification > tracking > - > - > - > - Take the tour! > - > - > - > - - tal:condition="features/app.root_blog.enabled"> > - Recent Launchpad blog posts > - > - -
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
> These are the same links, right? Yes, probably a copy-paste error, updated the links now -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
* - Annoynymous person (after): https://postimg.cc/21CmQF6P - Logged in person (after): https://postimg.cc/21CmQF6P * These are the same links, right? -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
Diff comments: > diff --git a/lib/lp/app/templates/root-index.pt > b/lib/lp/app/templates/root-index.pt > index ee51d55..2a6ffcf 100644 > --- a/lib/lp/app/templates/root-index.pt > +++ b/lib/lp/app/templates/root-index.pt > @@ -6,48 +6,7 @@ >metal:use-macro="view/macro:page/main_only" >i18n:domain="launchpad"> > > - > - .homepage { > - margin: auto; > - width: 90%; > - max-width: 80em; > - } > - #homepage-whatslaunchpad ul { > - margin-left: 1em; > - margin-bottom: 0.5em; > - } > - #homepage-whatslaunchpad ul, > - #homepage-whatslaunchpad-tour { > - font-weight: bold; > - } > - #homepage-stats { > - max-width: 50em; > - margin: auto; > - padding-top: 0.5em; > - color: gray; > - } > - #homepage-blogposts { > - padding-right: 4em; > - } > - #homepage-getstarted ul { > - padding-top: 0.5em; > - } > - .featured-project-top h3 { > - font-weight: bold; > - } > - .featured-project-top h3 img { > - vertical-align: middle; > - } > - .featured-project-top p { > - margin-top: 0.5em; > - margin-bottom: 1em; > - padding-bottom: .5em; > - border-bottom: 1px dotted #999; > - } > - #launchpad-logo-and-name { > - width: 250px; > - } > - > + href="https://assets.ubuntu.com/v1/vanilla-framework-version-4.7.0.min.css; /> I would prefer vendoring this file in the Launchpad tree, like we do for all other fronted dependencies, instead of relying on an external URL/service. > > > > @@ -67,90 +26,26 @@ > style="margin: 0 9em 1em 0"/> > > > - > - > - - tal:condition="view/show_whatslaunchpad"> > - Launchpad is a > software collaboration platform that provides: > - > - > - - tal:attributes="href apphomes/bugs">Bug tracking > - > - > - - tal:attributes="href apphomes/code">Code hosting > -using http://bazaar.canonical.com/;>Bazaar > -and https://git-scm.com/;>Git > - > - > - - href="https://help.launchpad.net/Code/Review;>Code > reviews > - > - > - - tal:attributes="href apphomes/ubuntu">Ubuntu package > building and hosting > - > - > - - tal:attributes="href > apphomes/translations">Translations > - > - > - - > href="https://help.launchpad.net/Teams/MailingLists;>Mailing lists > - > - > - - tal:attributes="href apphomes/answers">Answer tracking and > FAQs > - > - > - - tal:attributes="href apphomes/blueprints">Specification > tracking > - > - > - > - Take the tour! > - > - > - > - - tal:condition="features/app.root_blog.enabled"> > - Recent Launchpad blog posts > - > - -tal:repeat="post posts"> > - - tal:content="post/title"> > - Take the Launchpad survey > - 01 July > 2010 > - > - Tell us a little about how you use Launchpad by answering > - our short survey. > - > - > - > - > - > - http://blog.launchpad.net;>Read the > blog > - > - > - > - > - > - > - + > + > +xml:lang="en" lang="en" dir="ltr" >tal:attributes="action string:${rooturl}+search" >method="get" accept-charset="UTF-8"> > - > - > + > +Search > + > + value="" autofocus=""> > + > + > + value="Search">Search Now that we are placing a lot of emphasis on the search, we have to fix the broken search soon. :) > > > LPJS.use('lp', function () { > setFocusByName('field.text'); > }); > > - > + > > tal:content="view/project_count/fmt:intcomma">123projects, >
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
> Could you also update copyright string? (from 2004-2023 to 2004-2024) Done in a separate MP: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460927 -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
It looks good! Could you also update copyright string? (from 2004-2023 to 2004-2024) -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project
A few screenshots: - Annonymous person (before): https://postimg.cc/MX4vm42g - Annoynymous person (after): https://postimg.cc/21CmQF6P - Logged in person (after): https://postimg.cc/21CmQF6P These screenshots were taken before removing the "See more..." button, but the remaining should look the same -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/460819 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:frontpage-revamp-change-layout into ~ines-almeida/launchpad:frontpage-revamp-remove-top-project. ___ 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