Shopify_app: Missing app name in third-party cookie screen, and content improvements

Created on 6 Jan 2020  路  18Comments  路  Source: Shopify/shopify_app

Maybe related to #734

@emilybulger and @RyaGershcovich flagged some content and copy issues with the cookie screen. Rya has been delegated to propose some copy improvements, and there鈥檚 also a functional problem with the %{app} variable not rendering. Emily took a screenshot and I've annotated it below:

Screen Shot 2019-12-13 at 3 18 19 PM

Note: I'm just filing this issue to introduce the relevant people! I'm unsubscribing from the thread so you can all take it from here!

All 18 comments

This is because your ShopifyApp.configuration.application_name is not set. If this is set it will show up. https://github.com/Shopify/shopify_app/blob/master/app/views/shopify_app/sessions/top_level_interaction.html.erb#L41

@tanema how might one set it?

So talking this through offline, the issue is that some apps don鈥檛 set ShopifyApp.configuration.application_name, and this messaging relies on that value existing.

It seems to me:

  • Budget fix: change the copy to eliminate the need to name the app in this message.
  • Business-class fix: use the name if present and fall back to an alternate nameless message if it鈥檚 not there.

I can easily file a PR to do the budget fix. I'd need dev assistance for the deluxe version.

The budget fix would do, you can also add a warning if the app starts without an app name.

@RyaGershcovich You set your application name within your initializer where all the other application configuration is set.

Shopify.configure do |config|
   config.application_name = "Your app"
end

@ccleung @xto @marytal Can you guys please help with this? Currently, it's not pulling the app name. We need to add, Facebook, Google, and Amazon. Thank you!

@xto can you please run your console and check what the value of ShopifyApp.configuration.application_name is?

To run Rails commands use /exec rails ...
root@web-66f789858d-4hkn7:/# /exec rails c
Association Tracking for PaperTrail has been extracted to a separate gem. To use it, please add `paper_
trail-association_tracking` to your Gemfile. If you don't use it (most people don't, that's the default
) and you set `track_associations = false` somewhere (probably a rails initializer) you can remove that
 line now.
Loading production environment (Rails 5.2.2.1)
irb(main):001:0> ShopifyApp.configuration.application_name
=> "Google Shopping"
irb(main):002:0> 

Is there something that you're doing custom to ShopifyApp.configuration? Because the line in that page is as follows

app/views/shopify_app/sessions/top_level_interaction.html.erb

<h1 class="Polaris-DisplayText Polaris-DisplayText--sizeMedium"><%= I18n.t('top_level_interaction_heading', app: ShopifyApp.configuration.application_name) %></h1>
<div class="Polaris-EmptyState__Content">
  <p><%= I18n.t('top_level_interaction_body', app: ShopifyApp.configuration.application_name) %</p>
</div>

config/locales/en.yml

en:
  top_level_interaction_heading: "Your browser needs to authenticate %{app}"
  top_level_interaction_body: "Your browser requires apps like %{app} to ask you for access to cookies before Shopify can open it for you."

The only two things I can suggest for debugging purposes are updating the gem and runing a binding.pry during that page render and check the state of the configuration again. The code is not complicated so I am not sure what could go wrong here.

@tanema We just push a gem update. How can I trigger that page to see if the update fixed it ?

You should be able to just request that url (GET) but make sure you have a shop param

@emilybulger Can you please reproduce the error and give a little bit more context on how the devs might be able to reproduce it as well. Thank you!

Sure thing. Was looking at this test shop: titanplus.myshopify.com

Clicked on Channels > Messenger and saw this screen:

Screen Shot 2020-01-09 at 2 42 21 PM

Amazon also wasn't displaying correctly when I first noticed this bug on 12/13, but it now appears correctly. The Point of Sale Channel has appeared correctly throughout.

Was able to reproduce the same bug in my own test store (exploratory-emily.myshopify.com)

Firefox 71.0 (64-bit)

Anything else that would be helpful?

Google Shopping shows up as expected after the gem update.

Screen Shot 2020-01-10 at 9 08 16 AM

this is great!! Thank you @xto

Is this all fixed after updating your apps?

@xto @ccleung @marytal can you confirm please?

Was this page helpful?
0 / 5 - 0 ratings