Skip to content

feat(layout): introduce Layout API #499

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

Open
wants to merge 26 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4c954e3
feat(theme): patch theme
francoischalifour Mar 18, 2021
52bfd97
feat: convert CSS color vars to RGB and alpha tuples
francoischalifour Mar 19, 2021
cd6facd
feat: remove capitalize on header
francoischalifour Mar 19, 2021
b8728ca
feat: rename columns CSS classes
francoischalifour Mar 19, 2021
ed288f3
fix: fix scrollable class case
francoischalifour Mar 19, 2021
7fbeec3
chore: update comments
francoischalifour Mar 19, 2021
d64ed5a
fix: rename ItemIcon CSS modifiers
francoischalifour Mar 19, 2021
9a758ea
fix: fix DetachedContainer modal CSS modifier case
francoischalifour Mar 19, 2021
17cdd21
chore: improve stylelint config
francoischalifour Mar 19, 2021
a593a79
chore: update comments
francoischalifour Mar 19, 2021
87463e1
chore: run lint
francoischalifour Mar 19, 2021
75c56ed
chore(examples): update icon class
francoischalifour Mar 19, 2021
bd7e49b
fix: remove `aa-key-shadow` var
francoischalifour Mar 24, 2021
9c26026
feat: use base `z-index` var
francoischalifour Mar 24, 2021
71c229f
refactor: update CSS vars descriptions
francoischalifour Mar 24, 2021
8041ea3
docs: update comments
francoischalifour Mar 24, 2021
5f91aff
feat(layout): introduce Layout API
francoischalifour Mar 8, 2021
afb1e2f
chore(ci): add Layouts sandbox to CodeSandbox deployments
francoischalifour Mar 25, 2021
f12ae6b
Merge branch 'next' into feat/layout-api
francoischalifour Apr 7, 2021
37cf813
docs: update example
francoischalifour Apr 7, 2021
6e0b9d1
fix(theme): update footer gradient height
francoischalifour Apr 7, 2021
f1c4e5b
feat: rely on the Component API
francoischalifour Apr 7, 2021
e4e43ca
docs: update layout docs
francoischalifour Apr 7, 2021
dad554b
docs: remove debug mode
francoischalifour Apr 7, 2021
bf6786f
feat: darkmode for keys
Shipow Apr 9, 2021
283e5c7
feat: darkmode labels
Shipow Apr 9, 2021
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
Next Next commit
feat(theme): patch theme
Co-authored-by: Kevin Granger <[email protected]>
  • Loading branch information
francoischalifour and Shipow committed Mar 18, 2021
commit 4c954e33ecd2c5fea386bd2c4e9ae3dcee34ec3f
6 changes: 5 additions & 1 deletion bundlesize.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"path": "packages/autocomplete-js/dist/umd/index.production.js",
"maxSize": "14.50 kB"
"maxSize": "14.75 kB"
},
{
"path": "packages/autocomplete-preset-algolia/dist/umd/index.production.js",
Expand All @@ -23,6 +23,10 @@
{
"path": "packages/autocomplete-plugin-query-suggestions/dist/umd/index.production.js",
"maxSize": "4 kB"
},
{
"path": "packages/autocomplete-theme-classic/dist/theme.css",
"maxSize": "4 kB"
}
]
}
23 changes: 16 additions & 7 deletions packages/autocomplete-js/src/__tests__/render.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fireEvent, waitFor } from '@testing-library/dom';
import {
createElement as preactCreateElement,
Fragment,
Fragment as PreactFragment,
render,
} from 'preact';
Expand Down Expand Up @@ -358,16 +359,24 @@ describe('render', () => {
},
];
},
render({ createElement, children }, root) {
render({ createElement, children, sections }, root) {
expect(children).toEqual(
expect.objectContaining({
type: 'div',
type: Fragment,
props: {
className: expect.any(String),
children: expect.arrayContaining([
expect.any(Object),
expect.any(Object),
]),
children: [
expect.objectContaining({
props: {
className: 'aa-PanelLayout aa-Panel--Scrollable',
children: sections,
},
}),
expect.objectContaining({
props: {
className: 'aa-GradientBottom',
},
}),
],
},
})
);
Expand Down
5 changes: 4 additions & 1 deletion packages/autocomplete-js/src/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ export function renderPanel<TItem extends BaseItem>(
));

const children = (
<div className="aa-PanelLayout aa-Panel--Scrollable">{sections}</div>
<Fragment>
<div className="aa-PanelLayout aa-Panel--Scrollable">{sections}</div>
<div className="aa-GradientBottom" />
</Fragment>
);
const elements = sections.reduce((acc, current) => {
acc[current.props['data-autocomplete-source-id']] = current;
Expand Down
Loading