Skip to content

Add "isEmpty" prop to "MessageViewer"#2613

Merged
haiodo merged 2 commits into
mainfrom
message-viewer-empty-prop
Feb 9, 2023
Merged

Add "isEmpty" prop to "MessageViewer"#2613
haiodo merged 2 commits into
mainfrom
message-viewer-empty-prop

Conversation

@ghost

@ghost ghost commented Feb 9, 2023

Copy link
Copy Markdown

Contribution checklist

Brief description

Checklist

  • - UI test added to added/changed functionality?
  • - Screenshot is added to PR if applicable ?
  • - Does the code work? Check whether function and logic are correct.
  • - Does Changelog.md is updated with changes?
  • - Does the translations are up to date?
  • - Does it well tested?
  • - Tested for Chrome.
  • - Tested for Safari.
  • - Go through the changed code looking for typos, TODOs, commented LOCs, debugging pieces of code, etc.
  • - Rebase your branch onto master and upstream branch
  • - Is there any redundant or duplicate code?
  • - Are required links are linked to PR?
  • - Does new code is well documented ?

Related issues

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
@ghost
ghost requested review from BykhovDenis and haiodo February 9, 2023 12:12
$: dom = parser.parseFromString(message, 'text/html').firstChild?.childNodes[1] as HTMLElement
$: doc = parser.parseFromString(message, 'text/html')
$: dom = doc.firstChild?.childNodes[1] as HTMLElement
$: isEmpty = doc.documentElement.innerText.length === 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please do this stuff lazy on request only, we do not need it just for case.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
@haiodo
haiodo merged commit 3c5f67d into main Feb 9, 2023
@haiodo
haiodo deleted the message-viewer-empty-prop branch February 9, 2023 16:35
MichaelUray pushed a commit to MichaelUray/huly-platform that referenced this pull request Jul 9, 2026
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
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.

1 participant