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

LPS-128194 Delete author information from general Layouts Content Performance Panel. #962

Closed
wants to merge 66 commits into from

Conversation

cgoncas
Copy link
Collaborator

@cgoncas cgoncas commented Mar 2, 2021

Motivation

The content performance panel for widget and content will be the same that the web content's DPT, except for:
the author's field, that will be removed

Proposed solution

  1. The Layout implementation of AnalyticsReportsInfoItem won't return the author information
  2. The GetDataMVCCommand won't return the "author" information when this is not provided in the AnalyticsReportsInfoItem.
  3. We should avoid display the author's ContentRow in JS.

Screenshot 2021-03-02 at 22 43 10

/cc @dgarciasarai I have followed the idea you mentioned by author, we are not able to work into hide the reads, but we can try to hide the Author for the Layouts right now.

@liferay-continuous-integration

To conserve resources, the PR Tester does not automatically run for every pull.

If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed.

If your pull was never tested, comment "ci:test" to run the PR Tester for this pull.

@cgoncas cgoncas changed the title LPS-128194 Prepare JS to delete the author information when this info is empty. LPS-128194 Delete author information from general Layouts Content Performance Panel. Mar 2, 2021
@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 2, 2021

Hey @dgarciasarai and @darquesdev !!

This pull collides with all the other pull related with the Analytics Reports module, but I think it is ok if we start reviewing it, since we have other pulls stoped by the. CI.

Thanks!!

@cgoncas cgoncas added new feature 🏆 New feature or request on hold 🤚🏻 This pull request needs to wait in the queue labels Mar 2, 2021
@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 2, 2021

ci:test:sf

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 2, 2021

ci:test:relevant

@liferay-continuous-integration

✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: f2d0d6d5e462e7e6fa080243db843fdb6232988a

Sender Branch:

Branch Name: LPS-128194
Branch GIT ID: ddb298f604f8767482a3690e39e23bca1b0b2344

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration

@liferay-continuous-integration

✔️ ci:test:stable - 9 out of 9 jobs passed

❌ ci:test:relevant - 21 out of 23 jobs passed in 5 hours 59 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: f2d0d6d5e462e7e6fa080243db843fdb6232988a

Upstream Comparison:

Branch GIT ID: f2d0d6d5e462e7e6fa080243db843fdb6232988a
Jenkins Build URL: Acceptance Upstream DXP (master) #1599

ci:test:stable - 9 out of 9 jobs PASSED
9 Successful Jobs:
ci:test:relevant - 21 out of 23 jobs PASSED
21 Successful Jobs:
For more details click here.

Failures unique to this pull:

  1. test-portal-acceptance-pullrequest-batch(master)/modules-integration-mysql57-jdk8/0
    Job Results:

    406 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=1,label_exp=!master #427379
      1. GetDataMVCResourceCommandTest.testGetAuthorWithoutPortraitURL
        java.lang.NullPointerException
        	at com.liferay.analytics.reports.web.internal.portlet.action.test.GetDataMVCResourceCommandTest.lambda$testGetAuthorWithoutPortraitURL$0(GetDataMVCResourceCommandTest.java:136)
        	at com.liferay.analytics.reports.test.util.MockContextUtil.testWithMockContext(MockContextUtil.java:92)
        	at com.liferay.analytics.reports.web.internal.portlet.action.test.GetDataMVCResourceCommandTest.testGetAuthorWithoutPortraitURL(GetDataMVCResourceCommandTest.java:95)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$3.evaluate(TestExecutorRunnable.java:353)
        	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
        	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
        	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
        	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
        	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
        	at com.liferay.portal.kernel.test.rule.AbstractTestRu...

For upstream results, click here.

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 3, 2021

ci:test:sf

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 3, 2021

ci:test:relevant

@liferay-continuous-integration

❌ ci:test:sf - 0 out of 1 jobs passed in 4 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: c7640fbeeaefafecf0ddea7d37985c7ccb701b58

Sender Branch:

Branch Name: LPS-128194
Branch GIT ID: 4a69715ded2114c857e4f59f0e36c79fdf1eeacc

0 out of 1jobs PASSED
For more details click here.
     [java] java.lang.Exception: Found 1 formatting issues:
     [java] 1: ./modules/dxp/apps/analytics/analytics-reports-test/src/testIntegration/java/com/liferay/analytics/reports/web/internal/portlet/action/test/GetDataMVCResourceCommandTest.java expected:<...		Assert.assertNull([]contextJSONObject.ge...> but was:<...		Assert.assertNull([
     [java] 					]contextJSONObject.ge...>
     [java] 
     [java] 	at com.liferay.source.formatter.SourceFormatter.format(SourceFormatter.java:445)
     [java] 	at com.liferay.source.formatter.SourceFormatter.main(SourceFormatter.java:290)
[stopwatch] [run.batch.test.action: 1:32.272 sec]
     [echo] The following error occurred while executing this line:
     [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:572: The following error occurred while executing this line:
     [echo] /opt/dev/projects/github/liferay-portal/portal-impl/build.xml:706: Java returned: 1
      [get] Getting: http://test-1-10/job/test-portal-source-format/2579//consoleText
      [get] To: /opt/dev/projects/github/liferay-portal/20210302222902270.txt
   [delete] Deleting: /opt/dev/projects/github/liferay-portal/20210302222902270.txt
  [typedef] Could not load definitions from resource org/apache/maven/artifact/ant/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
   [delete] Deleting: /opt/dev/projects/github/liferay-portal/null141464016.properties

merge-test-results:
[mkdir] Created dir: /opt/dev/projects/github/liferay-portal/test-results
[junitreport] Processing /opt/dev/projects/github/liferay-portal/test-results/TESTS-TestSuites.xml to /tmp/null253513120
[junitreport] Loading stylesheet jar:file:/opt/java/ant/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 221ms
[junitreport] Deleting: /tmp/null253513120
[echo] A report with all the test results can be found at test-results/html/index.html.
[mkdir] Created dir: /opt/dev/projects/github/liferay-jenkins-ee/test-results
[copy] Copying 1 file to /opt/dev/projects/github/liferay-jenkins-ee/test-results
[echo] run.batch.test.tear.down.start.timestamp: 03-02-2021 22:29:07:928 PST
[stopwatch] [run.batch.test.tear.down: 0.000 sec]
[echo]
[echo] Ant GC log:
[echo]

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 3, 2021

Hey @dgarciasarai and @dgarciasarai !!

I have rebased this pull with the one the we already send to master (#959).

Thanks!!

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 3, 2021

ci:test:relevant

@liferay-continuous-integration

✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: c7640fbeeaefafecf0ddea7d37985c7ccb701b58

Sender Branch:

Branch Name: LPS-128194
Branch GIT ID: 7ca43c2c1fac47d292ca85d4e2ebd7d0de0c0035

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration

@liferay-continuous-integration

@darquesdev
Copy link

Just started reviewing :)

:octocat: Sent from GH.

@liferay-continuous-integration

Copy link

@darquesdev darquesdev left a comment

Choose a reason for hiding this comment

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

LGTM ;)

@liferay-continuous-integration

@liferay-continuous-integration

✔️ ci:test:stable - 9 out of 9 jobs passed

❌ ci:test:relevant - 18 out of 30 jobs passed in 3 hours 44 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: c7640fbeeaefafecf0ddea7d37985c7ccb701b58

Upstream Comparison:

Branch GIT ID: c7640fbeeaefafecf0ddea7d37985c7ccb701b58
Jenkins Build URL: Acceptance Upstream DXP (master) #1601

ci:test:stable - 9 out of 9 jobs PASSED
9 Successful Jobs:
ci:test:relevant - 18 out of 30 jobs PASSED

12 Failed Jobs:

18 Successful Jobs:
For more details click here.

Failures unique to this pull:


Failures in common with acceptance upstream results at c7640fb:
  1. test-portal-acceptance-pullrequest-batch(master)/modules-semantic-versioning-jdk8/0
    Job Results:

    0 Tests Passed.
    1 Test Failed.

    1. AXIS_VARIABLE=0,label_exp=!master #455991

      Please fix semantic versioning on cgoncas/LPS-128194

           [exec] Note: Recompile with -Xlint:unchecked for details.
           [exec] 
           [exec] > Task :apps:commerce:commerce-product-content-web:compileJSP
           [exec] 
           [exec] > Task :apps:commerce:commerce-product-content-web:zipZippableResources UP-TO-DATE
           [exec] > Task :apps:commerce:commerce-product-content-web:jar
           [exec] > Task :apps:commerce:commerce-product-content-web:autoUpdateXml SKIPPED
           [exec] > Task :apps:commerce:commerce-product-content-web:baseline SKIPPED
           [exec] > Task :apps:commerce:commerce-product-content-web:syncVersions
           [exec] 
           [exec] > Task :apps:commerce:commerce-frontend-js:packageRunBuild
           [exec] Bundling took 13s
           [exec] BUILD SASS: Built build/node/packageRunBuild/resources/.sass-cache/styles/main.css
           [exec] Minification summary:
           [exec]   Files processed:   2578
           [exec]   Files with errors: 857
           [exec]   Before size:       2998124
           [exec]   After size:        2249172
           [exec]   Delta:             748952
           [exec]   Elapsed:           5.69
           [exec] Received 0
           [exec] Done in 28.41s.
           [exec] 
           [exec] > Task :apps:commerce:commerce-frontend-js:processResources
           [exec] > Task :apps:commerce:commerce-frontend-js:classes
           [exec] > Task :apps:commerce:commerce-frontend-js:zipZippableResources UP-TO-DATE
           [exec] > Task :apps:commerce:commerce-frontend-js:jar
           [exec] > Task :apps:commerce:commerce-frontend-js:autoUpdateXml SKIPPED
           [exec] 
           [exec] FAILURE: Build failed with an exception.
           [exec] 
           [exec] * What went wrong:
           [exec] Execution failed for task ':apps:commerce:commerce-theme-minium:commerce-theme-minium-api:baseline'.
           [exec] > A failure occurred while executing com.liferay.gradle.plugins.baseline.internal.work.BaselineWorkAction
           [exec] 
           [exec] > Task :apps:commerce:commerce-frontend-js:baseline SKIPPED
           [exec] > Task :apps:commerce:commerce-frontend-js:syncVersions
           [exec] Gradle build finished at 2021-03-03 13:11:33.859.
           [exec]    > org.gradle.api.GradleException: Semantic versioning is incorrect while checking /opt/dev/projects/github/liferay-portal/tools/sdk/dist/com.liferay.commerce.theme.minium.api-5.0.0.jar against /opt/dev/projects/github/liferay-portal/.gradle/caches/modules-2/files-2.1/com.liferay.commerce/com.liferay.commerce.theme.minium.api/4.0.5/bfcd15127c565751df3aa4cf18de2068a65098b9/com.liferay.commerce.theme.minium.api-4.0.5.jar

  2. ...

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 3, 2021

ci:test:relevant

Copy link

@dgarciasarai dgarciasarai left a comment

Choose a reason for hiding this comment

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

Hey @cgoncas, the way you display the author is correct 👍 My concern is that the spacing now without the author is more than the design, but we can fix it later and this way, we didn't block the changes. Thanks!

<Author author={author} />
</ClayLayout.ContentCol>
</ClayLayout.ContentRow>
{author && (

Choose a reason for hiding this comment

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

❤️

@liferay-continuous-integration

@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 3, 2021

Just started reviewing :)

:octocat: Sent from GH.

@liferay-continuous-integration

@cgoncas cgoncas closed this Mar 4, 2021
@cgoncas
Copy link
Collaborator Author

cgoncas commented Mar 4, 2021

Forwaded brianchandotcom#99468

@cgoncas cgoncas deleted the LPS-128194 branch March 4, 2021 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet