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

add feedback question, remove other related. #18262

Merged
merged 117 commits into from Nov 12, 2021

Conversation

peterhashair
Copy link
Contributor

@peterhashair peterhashair commented Nov 3, 2021

Description:

Fixes:#18251 #18250 #18232

merge @andyjdavis #18277 remove refer us to this branch.

Please ignore the *umd.js file it VUE compile js, when doing a review.

This PR includes:

  1. remove feedback popup and related(remove old angular js, PHP and related test and UI screen shoot)
    plugin/feedback/**
  2. add feedback question banner(VUE template, adapter, Php render, UI tests, integration Tests)
    plugin/feedback/tests/**
  3. extend icon with heart (icon-heart)
  4. extend some date function with add month
  5. extend get current user register date and last seen
  6. extend modal adapter with validation, which does not close the modal.

Review

Peter Zhang added 3 commits November 2, 2021 11:50
remove feedback links
update screen shot
add feedback question
@peterhashair peterhashair linked an issue Nov 3, 2021 that may be closed by this pull request
21 tasks
@peterhashair peterhashair added this to the 4.6.0 milestone Nov 3, 2021
@peterhashair peterhashair added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Nov 3, 2021
Peter Zhang and others added 2 commits November 3, 2021 16:04
@diosmosis
Copy link
Member

@peterhashair will take a look at this now.

@diosmosis
Copy link
Member

@peterhashair The AJAX issue is fixed by this:

https://github.com/matomo-org/matomo/blob/vue-comparisons/plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts#L154

There are a couple fixes like this in that branch, I can create a quick PR for that specific one.

I'm not sure why ./console vue:build Feedback doesn't work for you, it's working for me. Are you running it, then loading the app w/ development mode enabled? If so, can you check in the chrome sources whether the new file is actually loaded? If it's a file created with --watch, it will have a lot of eval(...)s.

@diosmosis
Copy link
Member

Also, @sgiehl would you have time to checkout this branch and see if you can reproduce the vue:build Feedback vs vue:build --watch Feedback issue?

@peterhashair
Copy link
Contributor Author

@diosmosis sorry, I may be confused you, the command itself works. But the interface looks different from watch.
Here is the screenshot, I guess it maybe related to <style scope>
image

@diosmosis
Copy link
Member

diosmosis commented Nov 3, 2021

@peterhashair oh I see, we're not supporting the use of styles from within Vue right now, instead we're still using the less files and core asset pipeline to define styling. This is mainly to keep the finished asset size down.

EDIT: If removing the style from the vue file doesn't change things, let me know.

Peter Zhang added 3 commits November 4, 2021 11:05
remove in line css, change to less file
move translation key to plugin
remove feedback popup
@peterhashair
Copy link
Contributor Author

@diosmosis yes it's the line <style scope> that causes the problem.

Peter Zhang added 4 commits November 4, 2021 14:49
…ection

# Conflicts:
#	plugins/Feedback/vue/dist/Feedback.umd.js
#	plugins/Feedback/vue/dist/Feedback.umd.min.js
update remove some test and feedback related
@peterhashair peterhashair mentioned this pull request Nov 4, 2021
11 tasks
@peterhashair peterhashair linked an issue Nov 4, 2021 that may be closed by this pull request
Peter Zhang added 6 commits November 4, 2021 17:18
add draft tests
update feedback add php and UI tests
update test screen shots
add heart to demo page
add feedback back in extend the modal
…ollection

# Conflicts:
#	plugins/CoreHome/vue/dist/CoreHome.umd.min.js
@peterhashair
Copy link
Contributor Author

@sgiehl I think this is ready for another review 😀

Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Had another look at the changes. In general most stuff seems to work as expected now 👍
Left a couple of comments. Most of them are actually related to code cleanup and improvements.
Guess afterwards this will be ready to merge

core/Plugin/API.php Outdated Show resolved Hide resolved
plugins/Feedback/API.php Show resolved Hide resolved
plugins/CoreHome/vue/src/CookieHelper/CookieHelper.ts Outdated Show resolved Hide resolved
plugins/Feedback/API.php Outdated Show resolved Hide resolved
plugins/Feedback/API.php Outdated Show resolved Hide resolved
plugins/Feedback/Feedback.php Outdated Show resolved Hide resolved
Comment on lines 119 to 122
if (location.href.includes('forceFeedbackTest')) {
this.question = 0;
setCookie(cookieName, 0, 7);
} else {
Copy link
Member

Choose a reason for hiding this comment

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

I guess this one is to ensure the UI test always shows the same question? Guess this could be achieved also by setting the cookie in the UI test using page.setCookie

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sgiehl I tried set page.setCookie in the Test, but its return method was not found. Then I tried to add setCookies in tests/lib/screenshot-testing/support/page-renderer.js still no luck

Copy link
Member

Choose a reason for hiding this comment

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

You may need to add setCookie to the list of proxied methods here: https://github.com/matomo-org/matomo/blob/4.x-dev/tests/lib/screenshot-testing/support/page-renderer.js#L53
If that method is not proxied it will only be available through page.webpage.setCookie

Peter Zhang and others added 24 commits November 12, 2021 10:07
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
update cookie and tests
…ollection

# Conflicts:
#	plugins/CoreHome/vue/dist/CoreHome.umd.js
#	plugins/CoreHome/vue/dist/CoreHome.umd.min.js
test setcookie in tests
update tests
update tests
update cookie test
extend setCookie in test
update elints format
test set cookie
set cookie after goto URL
update set cookie
update test URL
@peterhashair peterhashair merged commit bf341b7 into 4.x-dev Nov 12, 2021
@peterhashair peterhashair deleted the m-18251-feedback-collection branch November 12, 2021 23:49
@peterhashair peterhashair mentioned this pull request Nov 14, 2021
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collect feedback about what features people are using? Remove review popup
5 participants