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(Dropdown): use `placeholder` as default text #3586

merged 4 commits into from Jul 7, 2019


Copy link

eyas2014 commented Apr 27, 2019

Fixes #3581.

We should always display some text in div.text because SUI does the same thing: Actually, this is also an answer why we don't have any unit tests for this behavior.

SUI has styles that will prevent visibility off div.text:



This comment has been minimized.

Copy link

welcome bot commented Apr 27, 2019

💖 Thanks for opening this pull request! 💖

Here is a list of things that will help get it across the finish line:

  • Run yarn lint locally to catch formatting errors. This will fix some errors automatically, commit and push any changes.
  • Run yarn test locally to catch errors. This ensures all components still behave as they should.
  • Run yarn start to run the doc site locally and try a few pages, ensuring everything is in good working order.
  • Include tests when adding/changing behavior.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.


This comment has been minimized.

Copy link

codecov-io commented Apr 27, 2019

Codecov Report

Merging #3586 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3586      +/-   ##
- Coverage   99.83%   99.83%   -0.01%     
  Files         174      174              
  Lines        3105     3103       -2     
- Hits         3100     3098       -2     
  Misses          5        5
Impacted Files Coverage Δ
src/modules/Dropdown/Dropdown.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8e894c...1a15b4e. Read the comment docs.


This comment has been minimized.

Copy link

layershifter commented Jun 23, 2019

Sorry for the late feedback. I want to check this change additionally because it was not covered by unit tests before 😮


This comment has been minimized.

Copy link

mattgd commented Jul 1, 2019

Hi @layershifter! Any word on this PR? Is there anything I might be able to do to help with testing to expedite this?

@layershifter layershifter changed the title Fix #3581 fix(Dropdown): use `searchQuery` as `text` Jul 7, 2019
@layershifter layershifter changed the title fix(Dropdown): use `searchQuery` as `text` fix(Dropdown): use `placeholder` as default text Jul 7, 2019
layershifter added 3 commits Jul 7, 2019

This comment has been minimized.

Copy link

layershifter commented Jul 7, 2019

@mattgd @eyas2014 thank you for contributions and follow ups 👍

I checked this issue deeply and value was invisible because we haven't render any text, so @eyas2014 provided a correct fix ⭐️ But, we should render a placeholder instead of searchQuery by default as SUI does:

  <div class="ui floating dropdown labeled search button icon active visible">
    <input class="search" autocomplete="off" tabindex="0" value="VALUE" />
    <span class="text filtered">PLACEHOLDER</span>

@@ -1193,9 +1193,8 @@ export default class Dropdown extends Component {
search && searchQuery && 'filtered',
let _text = placeholder
if (searchQuery) {
_text = null

This comment has been minimized.

Copy link

layershifter Jul 7, 2019


SUI renders text always and has styles to make it invisible 🐙

@layershifter layershifter merged commit 087593c into Semantic-Org:master Jul 7, 2019
3 checks passed
3 checks passed
ci/circleci Your tests passed on CircleCI!
codecov/patch 100% of diff hit (target 99.83%)
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +0.16% compared to f8e894c

This comment has been minimized.

Copy link

welcome bot commented Jul 7, 2019

Congrats on merging your first pull request! 🎉🎉🎉

robot victory dance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.