Skip to content

Commit

Permalink
cleanup & fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Sep 18, 2023
1 parent 420c0de commit bb2e559
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 103 deletions.
1 change: 0 additions & 1 deletion templates/trackingCodeReact.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<p>{{'SitesManager_SiteWithoutDataCloudflareFollowStepsIntro'|translate}}</p>
<div
vue-entry="TagManager.TrackingSPAPage"
current-action="{{ action|json_encode }}"
show-container-row="{{ showContainerRow|json_encode }}"
js-framework="react"
>
Expand Down
5 changes: 2 additions & 3 deletions templates/trackingSPA.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<br>
<p>{{ 'SitesManager_SiteWithoutDataCloudflareFollowStepsIntro'|translate }}</p>
<div
vue-entry="TagManager.TrackingSPAPage"
current-action="{{ action|json_encode }}"
show-container-row="{{ showContainerRow|json_encode }}"
vue-entry="TagManager.TrackingSPAPage"
show-container-row="{{ showContainerRow|json_encode }}"
>
</div>
<br>
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/EmptySite_React_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("EmptySite_React", function () {
await page.waitForSelector('#start-tracking-details .codeblock', {visible: true});
await page.evaluate(function () {
// since containerID will be random and keeps changing
var selector = $('#reactjs .codeblock');
var selector = $('#start-tracking-details .codeblock');
selector.text(selector.text().replace(/http(.*)container_(.*).js/g, 'http://localhost/js/container_test123.js'));
});

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 93 additions & 89 deletions vue/dist/TagManager.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vue/dist/TagManager.umd.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion vue/src/TagmanagerTrackingCode/TagManagerTrackingCode.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.tagManagerTrackingCode {
padding-top: 1rem;
display: inline-block;

> .row, > .row .row {
margin-bottom: 0;
Expand All @@ -18,4 +17,8 @@
label[for="containers"], label[for="environment"] {
top: -4px !important;
}

.siteSelector {
max-width: 100%;
}
}
1 change: 0 additions & 1 deletion vue/src/TagmanagerTrackingCode/TrackingCodeCommon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ function ucfirst(s: string): string {
export default defineComponent({
props: {
showContainerRow: Boolean,
currentAction: String,
showBottom: Boolean,
showDescription: Boolean,
showPlainMtmSteps: Boolean,
Expand Down
8 changes: 5 additions & 3 deletions vue/src/TagmanagerTrackingCode/TrackingSPAPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
-->
<template>
<ol class="list-style-decimal">
<li>
<li ref="step1" v-show="step1HasContent">
<span v-html="$sanitize(setupStep1)" v-if="showContainerRow"></span>
<TrackingCodeCommon
:show-container-row="showContainerRow"
:current-action="currentAction"
:showBottom="false"
:showDescription="false"
@fetchInstallInstructions="fetchInstallInstructionsSPA"
Expand Down Expand Up @@ -76,7 +75,6 @@ interface TagmanagerTrackingSPAPageState {
export default defineComponent({
props: {
showContainerRow: Boolean,
currentAction: String,
jsFramework: String,
},
components: {
Expand Down Expand Up @@ -174,6 +172,10 @@ export default defineComponent({
},
},
computed: {
step1HasContent() {
const elem = this.$refs.step1 as HTMLElement;
return elem && elem.textContent !== '';
},
fetchFollowStep3() {
return translate(
'TagManager_SPAFollowStep3',
Expand Down

0 comments on commit bb2e559

Please sign in to comment.