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

Migrate custom dimension management #18926

Merged
merged 11 commits into from Mar 17, 2022
Merged

Migrate custom dimension management #18926

merged 11 commits into from Mar 17, 2022

Conversation

diosmosis
Copy link
Member

@diosmosis diosmosis commented Mar 12, 2022

Description:

Changes:

  • Migrate CustomDimensions management directive to Vue.
  • Add MatomoUrl.updateHashToUrl() method which sets entire hash (since CustomDimensions management sets the URL to /list).

image

(4.x-dev)
image

Review

@diosmosis diosmosis added the Needs Review PRs that need a code review label Mar 12, 2022
@diosmosis diosmosis added this to the 4.9.0 milestone Mar 12, 2022
@sgiehl
Copy link
Member

sgiehl commented Mar 15, 2022

@diosmosis there are a few todo comments left over in the code. Is anything still left over there, or can those comments simply be removed?

@diosmosis
Copy link
Member Author

@sgiehl removed them

plugins/CustomDimensions/vue/src/Manage/Manage.vue Outdated Show resolved Hide resolved
plugins/CustomDimensions/vue/src/Edit/Edit.vue Outdated Show resolved Hide resolved
plugins/CustomDimensions/vue/src/Edit/Edit.vue Outdated Show resolved Hide resolved
plugins/CustomDimensions/vue/src/Edit/Edit.vue Outdated Show resolved Hide resolved
plugins/CustomDimensions/vue/src/Edit/Edit.vue Outdated Show resolved Hide resolved
plugins/CustomDimensions/vue/src/List/List.vue Outdated Show resolved Hide resolved
@sgiehl sgiehl removed the Needs Review PRs that need a code review label Mar 16, 2022
@diosmosis
Copy link
Member Author

@sgiehl applied fixes

Co-authored-by: Stefan Giehl <stefan@matomo.org>
@diosmosis
Copy link
Member Author

@sgiehl removed the extra translation

Comment on lines +291 to +298
manuallyTrackCodeViaJs(dimension: CustomDimension) {
return `_paq.push(['setCustomDimension', ${dimension.idcustomdimension}, `
+ `'${translate('CustomDimensions_ExampleValue')}']);`;
},
manuallyTrackCodeViaPhp(dimension: CustomDimension) {
return `$tracker->setCustomDimension('${dimension.idcustomdimension}', `
+ `'${translate('CustomDimensions_ExampleValue')}');`;
},
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't those be computed properties like manuallyTrackCode? Currently it only outputs
image

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, fixed, apologies for the back & forth

Copy link
Member Author

Choose a reason for hiding this comment

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

actually they should be methods, not yet fixed

Copy link
Member Author

Choose a reason for hiding this comment

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

should be fixed in latest commit

@sgiehl sgiehl merged commit d5f5016 into 4.x-dev Mar 17, 2022
@sgiehl sgiehl deleted the vue-custom-dim-manage branch March 17, 2022 14:16
@sgiehl sgiehl mentioned this pull request Mar 17, 2022
11 tasks
@justinvelluppillai justinvelluppillai changed the title [Vue] migrate custom dimension management Migrate custom dimension management Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants