Closed blackboxsw closed 5 years ago
@blackboxsw Sorry that Vanilla framework is misleading in promise of functionality. Vanilla framework is a CSS only framework but we are working on our documentation to make is easier to integrate into any JS or JS framework.
That said we do have a small ES6 script which you can use to give you the functionality you are seeking. You can find this script in the source of the pattern demo: view-source:https://canonical-web-and-design.github.io/vanilla-framework/examples/patterns/code-snippet/
@anthonydillon thanks, there might be a pre writeup how to get the active JS attached already. That would be the fix (or better how-to) then.
But do we know who owns/administrates https://auth.contracts.canonical.com/ so that this can then be implemented? @blackboxsw do you happen to know who owns that?
@cpaelzer it looks like this is the repo for the template which is that used in the parent project: https://github.com/CanonicalLtd/ua-frontend
This should help you know who maintains that site.
I have reported an issue to add the copy to clipboard functionally to the sites template: https://github.com/CanonicalLtd/ua-frontend/issues/22
Thank you @anthonydillon
This has been fixed upstream and should be live shortly.
Originally filed against ubuntu-advantage-client as https://github.com/CanonicalLtd/ubuntu-advantage-client/issues/483
Note: This is not a UA-client issue, but I file it here for you to re-route it accordingly.
That failing button is defined as:
Affected Browsers (What is in Bionic as of today):
The css is from the vanilla framework, inspection shows
vanilla-framework-version-1.8.1.css
Based on that I guessed that some JS in the vanilla framework would assign an onclick to this class, but I haven't found any JS other than the google analytics. Of course my 20 year old web-foo might just be outdated.
But knowing that we use that style all over out tutorials and such I tried there and it worked fine e.g. on provisioning maas
Inspecting (and comparing) that showed the same button tech:
<button class="p-code-snippet__action">Copy to clipboard</button>
But the broken (contracts.canonical.com) had no Event Listeners at all on that button. While the tutorial had several registered, those were a bunch of google analytics tags but more importantly also this:
This seems to be the missing code
And knowing that we find in the main page the loaders:
And the broken page has nothing there:
Please fix https://auth.contracts.canonical.com/ to carry the code to be active on that copy-to-clipboard button