question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Idea Hub notice not showing in editor

See original GitHub issue

Bug Description

In #3272 we added a notice to the editor for posts created for Idea Hub ideas.

This has since stopped appearing due to a change in the way the script is built. Originally, it was added as a “basic module” in our Webpack config which is a separate section of entries which have minimal optimization. https://github.com/google/site-kit-wp/blob/93d2c1b3e902cd4d91aadf82e029d0d5fabaa830/webpack.config.js#L282-L289

The regression was caused when I asked for this to be moved into our primary list of JS entries due to its internal use of SK api/cache which made it less safe to use as a basic module. In particular, api/cache relies on a GOOGLESITEKIT_VERSION constant which is only provided to our primary modules, so cache keys were not generated properly when used as a basic module.

However, in doing so the script has stopped loading due to missing Webpack dependencies.

The asset in WP only requires our googlesitekit-i18n, but inspecting the built script shows it requires both our runtime (expected of all main entries), but also googlesitekit-vendor.

},[["./assets/js/googlesitekit-idea-hub-notice.js","runtime","googlesitekit-vendor"]]]);

The vendor dependency seems a bit unnecessary but from what I can tell there are at least two reasons for this:

  • Use of global keyword – this is a node thing which we use for consistency everywhere so Webpack loads a compatibility module from ./node_modules/webpack/buildin/global.js to handle this
  • Apart from that – the only thing I can see are Babel runtime async-to-generator modules so that would imply any async function would require vendor as well

The fix is as simple as adding the missing dependencies to the Asset instance.

Steps to reproduce

  1. Create a draft from an Idea Hub idea
  2. Edit the post
  3. Note the notice at the top that identifies the source idea is not shown

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The Idea Hub notice for display in the post editor should be shown when viewing a post created for an Idea Hub idea (unless dismissed)

Implementation Brief

Test Coverage

  • No changes

Visual Regression Changes

  • No changes

QA Brief

  • Follow above steps to reproduce, you should see the notice now

Changelog entry

  • N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aaemnnosttvcommented, Aug 11, 2021

Here is the issue which would fix this in a more holistic way which would be nice to revisit https://github.com/google/site-kit-wp/issues/3195 (cc: @felixarntz)

0reactions
wpdarrencommented, Aug 17, 2021

Thanks for clarifying that @felixarntz

QA Update: ✅

Verified:

  • Can confirm that the notice appears when you edit a draft post created in Idea Hub.
  • The format of the notice message is This post was created from an idea you picked in Site Kit’s Idea Hub: <Topic idea title>
  • Confirmed that the notice displays correctly on smaller screen sizes. - Screenshot
  • Confirmed that the notice displays correctly on supported browsers.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Re: Incorrect Late notice showing. - Instructure Community
They were all submitted on time, with some even showing submission on the following day. The grades show full credit as they were...
Read more >
Unity Hub Not installing the Editor on windows 10
I tried to add an install with the Hub but it doesn't get installed, last time I reported this bug I got a...
Read more >
Wix Editor: Troubleshooting Buttons | Help Center | Wix.com
Troubleshooting Button Issues · Click the Design icon on the button. · Click the Text or Icon tab. · Enable the Show text...
Read more >
Showing support message on top of the Qlik Sense Hub page
1. Increase the flex base of the Hub Toolbar section by the number of pixels your message row's height should be. In my...
Read more >
[PowerApps] Building a modern "Idea Hub" - PPMBLOG.ORG
Its not as easy as 1,2,3 but watching a few YoutTube video ... Notice that you can control for how long new ideas...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found