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: chip typeahead value placement #1748

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

bitpshr
Copy link
Member

@bitpshr bitpshr commented May 3, 2021

Type: bug

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit tests are included in the PR
  • For new widgets, an entry has been added to the .dojorc
  • For new widgets, theme.variant() is added to the root domnode
  • Any widget variant uses theme.compose like this
  • WidgetProperties are exported

Description:

This pull request fixes an issue where chip values were not wrapped inline with the input.

Resolves #1742

@bitpshr bitpshr requested review from agubler and matt-gadd May 3, 2021 16:49
@vercel
Copy link

vercel bot commented May 3, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

dojo.widgets – ./

🔍 Inspect: https://vercel.com/dojo/dojo.widgets/GDd3j7fhCSaV8sWymhHmoCs3rGo1
✅ Preview: https://dojowidgets-git-fix-chip-placement-dojo1.vercel.app

widget-test-docs – ./

🔍 Inspect: https://vercel.com/dojo/widget-test-docs/89UZhuQZwrEKXrruXhiayKz4WjSH
✅ Preview: https://widget-test-docs-git-fix-chip-placement-dojo1.vercel.app

@bitpshr bitpshr marked this pull request as draft May 3, 2021 16:52
@codecov
Copy link

codecov bot commented May 3, 2021

Codecov Report

Merging #1748 (ef0788c) into master (7c8e49e) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1748      +/-   ##
==========================================
- Coverage   90.46%   90.45%   -0.02%     
==========================================
  Files          94       94              
  Lines        5152     5155       +3     
  Branches     1406     1408       +2     
==========================================
+ Hits         4661     4663       +2     
  Misses        241      241              
- Partials      250      251       +1     
Impacted Files Coverage Δ
src/text-input/index.tsx 92.06% <75.00%> (-0.62%) ⬇️

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 7c8e49e...ef0788c. Read the comment docs.

@@ -8,6 +8,7 @@ import { formatAriaProperties } from '../common/util';
import HelperText from '../helper-text/index';
import Label from '../label/index';
import * as css from '../theme/default/text-input.m.css';
import { isArray } from 'util';
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure if this is a correct import

@@ -226,6 +227,11 @@ export const TextInput = factory(function TextInput({
const inputFocused = focus.isFocused('input');
const autofilled = Boolean(icache.get('autofilled'));

let leadingElements;
if (leading) {
leadingElements = isArray(leading) ? leading : [leading];
Copy link
Contributor

Choose a reason for hiding this comment

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

Array.isArray

Copy link
Member Author

Choose a reason for hiding this comment

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

TEMPORARY INSANITY

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.

ChipTypeahead wraps input to new line
2 participants