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

Fix the UI glitch when keywords are empty (#857) #892

Merged

Conversation

MarcelRobitaille
Copy link
Collaborator

Fix the UI glitch with a tiny blob in the keywords field when loading a recipe with empty keywords. The bug was caused by keywords.split(',') when keywords is an empty string. This will create an array of a single element: an empty string. Rendering this empty string as a keyword results in this little blob. The solution is to filter out empty strings after the call to .split().

Copy link
Collaborator

@seyfeb seyfeb left a comment

Choose a reason for hiding this comment

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

Again, untested but looks good ;)

@codecov
Copy link

codecov bot commented Feb 19, 2022

Codecov Report

Merging #892 (35fc12a) into master (3c27626) will not change coverage.
The diff coverage is n/a.

❗ Current head 35fc12a differs from pull request most recent head 17d4e86. Consider uploading reports for the commit 17d4e86 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #892   +/-   ##
=======================================
  Coverage   21.22%   21.22%           
=======================================
  Files          20       20           
  Lines        1555     1555           
=======================================
  Hits          330      330           
  Misses       1225     1225           
Flag Coverage Δ
integration 7.07% <ø> (ø)
unittests 14.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@github-actions
Copy link

github-actions bot commented Feb 19, 2022

Unit Test Results

  22 files    22 suites   8m 29s ⏱️
  66 tests   66 ✔️ 0 💤 0
726 runs  726 ✔️ 0 💤 0

Results for commit 17d4e86.

♻️ This comment has been updated with latest results.

@christianlupus christianlupus force-pushed the fix-ui-glitch-empty-keywords branch from 2fdb6a3 to 1870a5a Compare February 24, 2022 17:14
MarcelRobitaille and others added 3 commits February 24, 2022 18:15
Signed-off-by: Marcel Robitaille <marcelrobitaille11@gmail.com>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Signed-off-by: Christian Wolf <github@christianwolf.email>
@christianlupus christianlupus force-pushed the fix-ui-glitch-empty-keywords branch from 1870a5a to 17d4e86 Compare February 24, 2022 17:16
@christianlupus
Copy link
Collaborator

closes #857

@christianlupus christianlupus linked an issue Feb 24, 2022 that may be closed by this pull request
@christianlupus christianlupus merged commit bf5ee39 into nextcloud:master Feb 24, 2022
@MarcelRobitaille MarcelRobitaille deleted the fix-ui-glitch-empty-keywords branch February 24, 2022 17:39
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.

Empty list of keywords causes UI glitch
3 participants