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

SVG Icons! #2028

Merged
merged 50 commits into from
Feb 1, 2018
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
414032e
add svgo to node-build-scripts
Jan 23, 2018
dd72980
add type information and @ts-check to generate-icons-source
Jan 23, 2018
a26afdb
iconContents.tsx contains `export const ICON_NAME = <svg>...</svg>` f…
Jan 23, 2018
85e41b3
generate and export IconSvgs
Jan 23, 2018
50c460b
refactor existing Icon component to render SVGs
Jan 23, 2018
3b2ff4b
fix usages (no more iconSize)
Jan 24, 2018
36159e8
svg.pt-icon style fixes, LegacyIconName extends IconName
Jan 24, 2018
ea5fbf8
revert documentalist usage
Jan 24, 2018
739e643
svgo v1 (0.7 is still used by css-loader :sad:)
Jan 24, 2018
87e8f09
iconSvgs => iconSvgPaths, map of icon name to array of path strings (…
Jan 24, 2018
eb79ca2
update DocsIcon
Jan 24, 2018
e242f50
remove style tag from endorsed icon (the only one that had it)
Jan 24, 2018
a82d096
fix tree test
Jan 24, 2018
718ff50
IconSvgPaths16 and IconSvgPaths20 objects
Jan 24, 2018
5e042e5
[WIP] choose 16 or 20 based on iconSize + example
Jan 24, 2018
a0f70da
back to iconSize
Jan 24, 2018
fe13ed7
one more, InputGroup needs a css fix
Jan 24, 2018
9ef12bb
requires, remove tslints
Jan 24, 2018
2fd23d6
iconSize <= 16 ? use 16 : use 20
Jan 24, 2018
f99ee70
color + style props, spread all svg props
Jan 24, 2018
fc5dd11
fix React prop warnings, remove invalid clipRule (not inside clipPath)
Jan 24, 2018
3f900a7
fix icons in input groups - padding only!
Jan 24, 2018
99b11e9
improve IconExample with IconSuggest
Jan 24, 2018
fb3a8fc
scripts: dev:core watches labs, icons clean rm's src/generated
Jan 24, 2018
84dc720
Merge branch 'develop' of github.com:palantir/blueprint into gg/svg-i…
Jan 26, 2018
dd37942
Button uses Icon instead of class, Dialog close button Icon
Jan 26, 2018
063a648
IconSuggest new syntax
Jan 26, 2018
a9feff4
MenuItem renders Icon instead of class
Jan 26, 2018
728288a
magic negative margin aligns SVG and DOM
Jan 27, 2018
647d608
fix a bunch of tests (one offending Popover test)
Jan 27, 2018
1089e6e
fix that popover test
Jan 27, 2018
9ef3861
Merge branch 'develop' of github.com:palantir/blueprint into gg/svg-i…
Jan 31, 2018
5049f57
comments
Jan 31, 2018
de0df31
Merge branch 'develop' into gg/svg-icons
adidahiya Jan 31, 2018
84ef214
Merge branch 'develop' of github.com:palantir/blueprint into gg/svg-i…
Jan 31, 2018
394df5c
revert popoverTests, delete iconSize=inherit test
Jan 31, 2018
0d2c391
ensure itemPredicate has default value in QueryList. fixes Icon compo…
Jan 31, 2018
08bb074
Merge branch 'develop' of github.com:palantir/blueprint into gg/svg-i…
Feb 1, 2018
e10ea0c
fix tree example
Feb 1, 2018
1069282
move icon class to data-icon attribute
Feb 1, 2018
e47e2a6
update docs
Feb 1, 2018
daa8c56
put short IconName in data-icon attribute
Feb 1, 2018
de3013b
fix tests
Feb 1, 2018
ab45534
fix Icon props spread
Feb 1, 2018
a2ab952
examples/core-examples/common/IconSelect
Feb 1, 2018
8fa9b92
docs language, normalizedIconName
Feb 1, 2018
3ddec4c
fix MenuItem icon color and dark submenu shadow
Feb 1, 2018
0115861
fix input-group button icon size
Feb 1, 2018
b871252
Callout renders SVG Icon component (#2060)
giladgray Feb 1, 2018
2a8caae
clarify callout icon logic
Feb 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ensure itemPredicate has default value in QueryList. fixes Icon compo…
…nent eaxmple.
  • Loading branch information
Gilad Gray committed Jan 31, 2018
commit 0d2c39186d8584b74079b41efeff8feca3757227
2 changes: 1 addition & 1 deletion packages/select/src/components/query-list/queryList.tsx
Original file line number Diff line number Diff line change
@@ -293,7 +293,7 @@ export class QueryList<T> extends React.Component<IQueryListProps<T>, IQueryList
}

private renderItem = (item: T, index?: number) => {
const { activeItem, itemListPredicate, itemPredicate, query } = this.props;
const { activeItem, itemListPredicate, itemPredicate = () => true, query } = this.props;
const matchesPredicate = Utils.isFunction(itemListPredicate)
? this.state.filteredItems.indexOf(item) >= 0
: itemPredicate(query, item, index);
7 changes: 7 additions & 0 deletions packages/select/test/queryListTests.tsx
Original file line number Diff line number Diff line change
@@ -61,6 +61,13 @@ describe("<QueryList>", () => {
assert.isFalse(predicate.called, "item predicate should not be invoked");
});

it("omitting both predicate props is supported", () => {
shallow(<FilmQueryList {...testProps} query="1980" />);
const { items, renderItem } = testProps.renderer.args[0][0] as IQueryListRendererProps<IFilm>;
const filteredItems = items.map(renderItem).filter(x => x != null);
assert.lengthOf(filteredItems, items.length, "returns all films");
});

it("ensure onActiveItemChange is not called with undefined and empty list", () => {
const myItem = { title: "Toy Story 3", year: 2010, rank: 1 };
const filmQueryList = mount(<FilmQueryList {...testProps} items={[myItem]} activeItem={myItem} query="" />);