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-113582|LPS-113583 Replaces the usages of Liferay.Notification and Liferay.Notice with Liferay.Util.openToast #90226

Closed
wants to merge 30 commits into from

Conversation

wincent
Copy link

@wincent wincent commented Jun 17, 2020

Manual forward from liferay-frontend#5

ci:test:relevant failed with:

151 out of 154 jobs passed in 2 hours 56 minutes

Thank you to @john-co (comment) and @rodrigocunhaa (comment) for investigating and confirming that the failure is unrelated.

cc @diegonvs

Original description follows.


Forwarded here from wincent#309, where it was stuck in CI hell. Let's see if we have any better luck over here.

Original description:

Notification related things depends on review from Product Teams.

Previously:

  1. diegonvs#28
  2. wincent#297
  3. jbalsas#2197 + wincent#307

cc @diegonvs @jbalsas

…he given string is a HTML or not, uses a property for using `title` and `message ` as HTML in openToast utility.

From: jbalsas#2179 (comment)
…and use directly `dangerouslySetInnerHTML` on Text component
…penToast`

Found usages via:

`git grep '\bLiferay\.Notification\b'`

`git grep liferay-notification`
Usages were found running

`git grep '\bLiferay\.Notice\b'`
`git grep liferay-notice`

`Liferay.Util.openToast` utility was created for opening toasts and considering that Notice usages are for opening dismissible toasts, I could replace directly
…of Liferay.Notice AUI component and Liferay.Notice usages were replaced with `openToast` and ClayAlerts doesn't have animations
…s defined in whole file, these default values aren't needed
`React will automatically append a “px” suffix to certain numeric inline style properties.`

From: https://reactjs.org/docs/dom-elements.html
…ring markup.

For some cases in JSPs, HTML strings are being passed to openToast.
…he given string is a HTML or not, uses a property for using `title` and `message ` as HTML in openToast utility.

From: jbalsas#2179 (comment)
…and use directly `dangerouslySetInnerHTML` on Text component
Early this property was being used for handling the instance of the Liferay.Notice component but now it's unnecessary
…in and wasn't using it. However, it was using `aui-alert` but not declaring it. `liferay-notice` depends on `aui-alert` and I'm assuming that it was working due to this
…ser don't pass the title/message value React will not throw an error trying to render undefined
… use `messageType` and `titleType` for handling toast contents
Apparently another module was calling `plugin` module and It was working in the past due to this and this dep wasn't described on the `liferay-session` module. Adding as a dependency of `liferay-session`  solves the problem
…sion`

In some cases, apparently depending on the hardware, `aui-component` is not being loaded causing an error not localizing `A.component` on session AUI component
@liferay-continuous-integration
Copy link
Collaborator

Closing pull request because all liferay-portal pullrequests sent to Brian Chan must be sent by using ci:forward on a pull request that was sent to someone else.

@wincent
Copy link
Author

wincent commented Jun 17, 2020

ci:reopen

@brianchandotcom
Copy link
Owner

Merged. Thank you.
View total diff: 3a8f33b...24facc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants