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

BZ#1471301 - Login/nav brand and logo are set by api #1513

Merged
merged 2 commits into from
Jan 4, 2019

Conversation

AllenBW
Copy link
Member

@AllenBW AllenBW commented Dec 18, 2018

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1471301

In dev, these things will appear as broken images, but upon build, they show up just fine

Styling on login is a little jacked up atm... but we're applying the same classes so 🤷‍♂️

What we look like (note the url ui/service)

screen shot 2018-12-18 at 3 16 47 pm

screen shot 2018-12-18 at 3 16 34 pm

@AllenBW AllenBW requested review from himdel and skateman December 18, 2018 20:18
@AllenBW AllenBW added this to the Sprint 102 Ending Jan 7, 2019 milestone Dec 18, 2018
@AllenBW AllenBW force-pushed the BZ/#1471301_ref-hide-top-left-brand branch from a2732be to bcda20f Compare December 18, 2018 20:29
@skateman
Copy link
Member

@miq-bot add_reviewer @epwinchell

@miq-bot miq-bot requested a review from epwinchell December 19, 2018 08:03
@himdel
Copy link
Contributor

himdel commented Dec 19, 2018

Soo.. the problem with this is that "skins" work by replacing a few things, including:

  • Text.login.brand ( = vm.text.brand )
  • images/login-screen-logo.png
  • images/brand.svg

It looks like the API is serving the right images in that case, so the images should be fine.
The brand is missing the "Self Service" at the end now.

We should also update skin-sample/README.md and remove brand.svg and login-screen-logo.png from skin-sample/images/.
Oh, and from client/assets/images/.

But.. I'm still seeing

client/app/core/navigation/navigation-controller.js
131:      imgSrc: 'images/login-screen-logo.png',

so maybe that one should also be using brandingInfo now?

@AllenBW AllenBW force-pushed the BZ/#1471301_ref-hide-top-left-brand branch from bcda20f to aeb04e5 Compare December 19, 2018 12:43
@AllenBW
Copy link
Member Author

AllenBW commented Dec 19, 2018

Great points @himdel !! Updated pr as per feedback... what do we think about the Text skinning in general? Should that be replaced by name or name_full provided by the api in product_info?

@skateman i think the only thing thats kinda ah bummer, we're not setting brands and logos specific to the sui... so whatever is set for cui is same here... so yeah, we're missing self service text from logo :-/

@skateman
Copy link
Member

@himdel can we actually have skins since we're not exposing JS precompilation?

@AllenBW AllenBW force-pushed the BZ/#1471301_ref-hide-top-left-brand branch 3 times, most recently from a413a8e to 674b420 Compare December 19, 2018 14:45
@miq-bot
Copy link
Member

miq-bot commented Dec 19, 2018

Checked commit AllenBW@674b420 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍰

@himdel
Copy link
Contributor

himdel commented Dec 21, 2018

Thanks! :) Still seeing

client/assets/images/brand.svg
client/assets/images/login-screen-logo.png

that are not used now.

As for text, I kinda like the idea of SUI not caring about skins at all (except for pure CSS) and just getting all that from the API, so maybe we can just tack on +Self Service? (Although, not sure about the i18n aspect of that..)

@himdel
Copy link
Contributor

himdel commented Dec 21, 2018

@skateman Yes we can, they (whoever) just have to build it themselves :)

@AllenBW
Copy link
Member Author

AllenBW commented Dec 21, 2018

Leavin' in the images wasn't an oversight, it was intentional, to reduce pr commotion and then who knows, maybe someone will want em? But if yah really really want me to remove em, will do @himdel

@AllenBW
Copy link
Member Author

AllenBW commented Jan 2, 2019

@himdel
Copy link
Contributor

himdel commented Jan 3, 2019

Aah, thanks :)

Just one last think, I think... it's never using the images now...

/api/product_info returns them under branding_info.brand,
but the code is only looking at product_info.brand...

I'm guessing we need...

diff --git a/client/app/core/appliance-info.service.js b/client/app/core/appliance-info.service.js
index b195e911..98f741d1 100644
--- a/client/app/core/appliance-info.service.js
+++ b/client/app/core/appliance-info.service.js
@@ -27,8 +27,8 @@ export function ApplianceInfo ($sessionStorage) {
       server: data.server_info.appliance,
       asyncNotify: data.settings.asynchronous_notifications || true,
       nameFull: data.product_info.name_full,
-      brand: data.product_info.brand,
-      logo: data.product_info.logo
+      brand: data.product_info.branding_info.brand,
+      logo: data.product_info.branding_info.logo
     }
 
     $sessionStorage.applianceInfo = applianceInfo

@AllenBW AllenBW force-pushed the BZ/#1471301_ref-hide-top-left-brand branch from edb339a to a2c4f92 Compare January 3, 2019 15:05
In dev, these things will appear as broken images, but upon build,
they show up just fine
@AllenBW AllenBW force-pushed the BZ/#1471301_ref-hide-top-left-brand branch from a2c4f92 to 5e9bc85 Compare January 3, 2019 15:25
Copy link
Contributor

@himdel himdel left a comment

Choose a reason for hiding this comment

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

Verified I'm now seeing requests for those images in the console 👍

@himdel himdel merged commit c385bad into ManageIQ:master Jan 4, 2019
@AllenBW AllenBW deleted the BZ/#1471301_ref-hide-top-left-brand branch January 4, 2019 13:32
@himdel
Copy link
Contributor

himdel commented Jan 4, 2019

Looks like supporting showing the images in devel mode is non-trivial, we could make webpack-dev-server proxy /assets to the rails server and that should work fine ... except SUI is also using assets so the rest of the images would stop working instead :).

(Or maybe we can move all the images to CUI and just do that, but not sure that's the right direction, unless there's a plan to merge the 2.)

@AllenBW
Copy link
Member Author

AllenBW commented Jan 4, 2019

sad emoji, yeah gonna kinda given up on em workin in dev, maybe it'l be worth it to make a note in dev docs, for posterity n stuff

@simaishi
Copy link
Contributor

@AllenBW Can this be hammer/yes?

@AllenBW
Copy link
Member Author

AllenBW commented Mar 28, 2019

@simaishi should be a clean merge as there hasn't been too much churn on the files this touches.. 🤔

simaishi pushed a commit that referenced this pull request Mar 29, 2019
…rand

BZ#1471301 - Login/nav brand and logo are set by api

(cherry picked from commit c385bad)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693757
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit dbb82f6020e0dfd7b66ef139f0b4ce83f4e6b96c
Author: Martin Hradil <himdel@seznam.cz>
Date:   Fri Jan 4 14:09:11 2019 +0100

    Merge pull request #1513 from AllenBW/BZ/#1471301_ref-hide-top-left-brand
    
    BZ#1471301 - Login/nav brand and logo are set by api
    
    (cherry picked from commit c385bad4fdfcd2f397dfded662201ba63d7655c6)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693757

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.

5 participants