Skip to content

Commit

Permalink
chore: merge latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
dkilgore-eightfold committed Sep 27, 2022
1 parent 0ab0adc commit 3080122
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 34 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [2.13.2](https://github.com/EightfoldAI/octuple/compare/v2.13.1...v2.13.2) (2022-09-27)

### Bug Fixes

- update snaps to fix broken build ([#392](https://github.com/EightfoldAI/octuple/issues/392)) ([e3c1429](https://github.com/EightfoldAI/octuple/commits/e3c14292f34f3de0bed0201bcd3e2b71e53ff07c))

### [2.13.1](https://github.com/EightfoldAI/octuple/compare/v2.13.0...v2.13.1) (2022-09-27)

### Features

- match score: add support for custom label ([#367](https://github.com/EightfoldAI/octuple/issues/367)) ([6e0cd0f](https://github.com/EightfoldAI/octuple/commits/6e0cd0fb491976ef12f8e34306f66206ec6fcc82))

### Bug Fixes

- panel add scrollLock prop and select handle 0 value ([#390](https://github.com/EightfoldAI/octuple/issues/390)) ([2538b7e](https://github.com/EightfoldAI/octuple/commits/2538b7eb2d2d108dfaad7ee4c36afa35effa22b5))
- rtl: rtl ui polish ([#387](https://github.com/EightfoldAI/octuple/issues/387)) ([5eb44e9](https://github.com/EightfoldAI/octuple/commits/5eb44e94756811a54efe862f579a0b6118097b0b))
- theme: fixes navbar and tabs configprovider theme ([#389](https://github.com/EightfoldAI/octuple/issues/389)) ([d72ad05](https://github.com/EightfoldAI/octuple/commits/d72ad0538d865f7dbdd5cd315cb89d40028d2a3f))

## [2.13.0](https://github.com/EightfoldAI/octuple/compare/v2.12.1...v2.13.0) (2022-09-21)

### Features
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eightfold.ai/octuple",
"version": "2.13.0",
"version": "2.13.2",
"license": "MIT",
"main": "lib/octuple.js",
"types": "lib/octuple.d.ts",
Expand Down Expand Up @@ -210,7 +210,8 @@
],
"setupFiles": [
"react-app-polyfill/jsdom",
"jest-localstorage-mock"
"jest-localstorage-mock",
"<rootDir>/src/tests/setup"
],
"setupFilesAfterEnv": [
"window-resizeto/polyfill"
Expand Down
1 change: 1 addition & 0 deletions src/components/Panel/Panel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ const panelArgs: Object = {
closable: true,
bodyPadding: true,
headerPadding: true,
scrollLock: true,
children: (
<>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
Expand Down
4 changes: 3 additions & 1 deletion src/components/Panel/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const Panel = React.forwardRef<PanelRef, PanelProps>(
visible = false,
width,
panelHeader,
scrollLock = true,
...rest
},
ref
Expand All @@ -70,7 +71,8 @@ export const Panel = React.forwardRef<PanelRef, PanelProps>(
const containerRef = useRef<HTMLDivElement>(null);
const parentPanel = useContext<PanelRef>(PanelContext);
const [internalPush, setPush] = useState<boolean>(false);
useScrollLock(parent, visible);

useScrollLock(parent, !scrollLock ? false : visible);

const panelBackdropClasses: string = mergeClasses([
styles.panelBackdrop,
Expand Down
5 changes: 5 additions & 0 deletions src/components/Panel/Panel.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ export interface PanelProps extends Omit<OcBaseProps<HTMLElement>, 'title'> {
* Custom zIndex for the panel
*/
zIndex?: number;
/**
* Set this to enable/disable parent scroll
* @default true
*/
scrollLock?: boolean;
}

export interface PanelHeaderProps {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ export const Select: FC<SelectProps> = React.forwardRef(
const updatedOptions = options.map((opt: SelectOption) => ({
...opt,
selected:
(defaultValue && opt.value === defaultValue) ||
(defaultValue !== undefined &&
opt.value === defaultValue) ||
opt.selected,
}));
setOptions(updatedOptions);
Expand Down
24 changes: 12 additions & 12 deletions src/components/Select/__snapshots__/Select.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ exports[`Select Select is large 1`] = `
class="input-group right-icon"
>
<input
aria-controls="dropdown-22"
aria-controls="dropdown-"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="true"
class="select-input input-large with-icon-button input-stretch right-icon clear-disabled clear-not-visible"
id="input-23"
id="input-"
placeholder="Select"
readonly=""
role="textbox"
Expand Down Expand Up @@ -68,12 +68,12 @@ exports[`Select Select is medium 1`] = `
class="input-group right-icon"
>
<input
aria-controls="dropdown-26"
aria-controls="dropdown-"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="true"
class="select-input input-medium with-icon-button input-stretch right-icon clear-disabled clear-not-visible"
id="input-27"
id="input-"
placeholder="Select"
readonly=""
role="textbox"
Expand Down Expand Up @@ -122,12 +122,12 @@ exports[`Select Select is pill shaped 1`] = `
class="input-group right-icon"
>
<input
aria-controls="dropdown-38"
aria-controls="dropdown-"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="true"
class="select-input input-medium pill-shape pill-shape-with-icon-button input-stretch right-icon clear-disabled clear-not-visible"
id="input-39"
id="input-"
placeholder="Select"
readonly=""
role="textbox"
Expand Down Expand Up @@ -176,12 +176,12 @@ exports[`Select Select is rectangle shaped 1`] = `
class="input-group right-icon"
>
<input
aria-controls="dropdown-34"
aria-controls="dropdown-"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="true"
class="select-input input-medium with-icon-button input-stretch right-icon clear-disabled clear-not-visible"
id="input-35"
id="input-"
placeholder="Select"
readonly=""
role="textbox"
Expand Down Expand Up @@ -230,12 +230,12 @@ exports[`Select Select is small 1`] = `
class="input-group right-icon"
>
<input
aria-controls="dropdown-30"
aria-controls="dropdown-"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="true"
class="select-input input-small with-icon-button input-stretch right-icon clear-disabled clear-not-visible"
id="input-31"
id="input-"
placeholder="Select"
readonly=""
role="textbox"
Expand Down Expand Up @@ -284,12 +284,12 @@ exports[`Select Select is underline shaped 1`] = `
class="input-group right-icon"
>
<input
aria-controls="dropdown-42"
aria-controls="dropdown-"
aria-disabled="false"
aria-expanded="false"
aria-haspopup="true"
class="select-input input-medium with-icon-button underline input-stretch right-icon clear-disabled clear-not-visible"
id="input-43"
id="input-"
placeholder="Select"
readonly=""
role="textbox"
Expand Down
36 changes: 18 additions & 18 deletions src/components/Table/Tests/__snapshots__/Table.filter.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-19",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -209,7 +209,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-19",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -1226,7 +1226,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-19",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -1363,7 +1363,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-19",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -3151,7 +3151,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-19",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -3288,7 +3288,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-19",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -3740,7 +3740,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-21",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -3877,7 +3877,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-21",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -4894,7 +4894,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-21",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -5031,7 +5031,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-21",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -6819,7 +6819,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-21",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -6956,7 +6956,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-21",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -7408,7 +7408,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-1",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -7545,7 +7545,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-1",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -8562,7 +8562,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-1",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -8699,7 +8699,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-1",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -10487,7 +10487,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-1",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down Expand Up @@ -10624,7 +10624,7 @@ LoadedCheerio {
"children": Array [
Node {
"attribs": Object {
"aria-controls": "dropdown-1",
"aria-controls": "dropdown-",
"aria-disabled": "false",
"aria-expanded": "false",
"aria-haspopup": "true",
Expand Down
3 changes: 3 additions & 0 deletions src/tests/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jest.mock('../shared/utilities/uniqueId', () => ({
uniqueId: jest.fn((prefix) => prefix),
}));

0 comments on commit 3080122

Please sign in to comment.