Skip to content

Commit

Permalink
Merge pull request #162 from MeasureAuthoringTool/MAT-7722
Browse files Browse the repository at this point in the history
MAT-7722: Resizable Library Editor
  • Loading branch information
ethankaplan authored Oct 31, 2024
2 parents c094103 + 8d3ccc1 commit ad54c9e
Show file tree
Hide file tree
Showing 5 changed files with 365 additions and 245 deletions.
87 changes: 68 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@material-ui/core": "^4.12.4",
"@mui/icons-material": "^5.5.1",
"@mui/material": "^5.10.14",
"allotment": "^1.20.2",
"axios": "^1.6.5",
"babel-plugin-dynamic-import-node": "^2.3.3",
"classnames": "^2.3.1",
Expand Down
153 changes: 110 additions & 43 deletions src/components/editCqlLibrary/EditCQLLibrary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,6 @@
display: flex;
flex-grow: 1;

#left-panel {
width: 75%;
overflow: hidden;
}

#right-panel {
width: 25%;

> .inner-right {
padding: 43px 32px;
}

input {
&.Mui-disabled {
background-color: #ededed;
border: #ededed;
}
}

textarea {
resize: vertical;
border: none;
&.Mui-disabled {
background-color: #ededed;
border: #ededed;
}
}

label:not(.Mui-disabled) {
font-weight: 500;
font-size: 14px;
line-height: 17px;
color: #333;
text-transform: none;
}
}

#divider {
width: 22px;
height: initial;
Expand All @@ -85,11 +48,115 @@
align-items: center;
justify-content: flex-end;
}
}

.form-row {
display: flex;
flex-direction: row;
flex-grow: 1;
margin-bottom: 40px;
.form-row {
display: flex;
flex-direction: row;
flex-grow: 1;
margin-bottom: 40px;
}

.allotment-wrapper {
margin: 0 32px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);

.inner-right {
margin-left: 30px;
}

.split-view {
position: relative;
height: 700px;

.left-panel {
width: 75%;
overflow: hidden;

> .panel-content {
padding-top: 32px;
padding-left: 32px;
padding-right: 20px;
height: calc(100% - 48px);
}
}

.right-panel {
width: 25%;
margin-left: 12px;

> .panel-content {
padding-left: 16px;
padding-right: 16px;
height: calc(100% - 48px);
}

> .tab-container {
> .MuiButtonBase-root {
margin-right: 8px;

> .back-icon {
color: #0073c8;
}
}

> .spacer {
display: flex;
flex-grow: 1;
}

> .MuiTabs-root {
> .MuiTabs-scroller {
overflow-x: auto !important;
}
}
}
}

.left-panel,
.right-panel {
height: 100%;
background: #fff;

> .tab-container {
background-color: #ededed;
display: flex;
flex-direction: row;
align-items: center;

> .MuiTabs-root {
background-color: #ededed;
margin-left: 16px;
}
}

> .panel-content {
overflow: scroll;
}
}

.sash {
width: 16px;
background-color: #ddd;

&:before {
position: absolute;
content: "";
top: 50%;
width: 4px;
height: 34px;
border: solid 1.5px #717171;
border-color: transparent #717171 transparent #717171;
}

&:after {
position: absolute;
content: "";
top: 0;
height: 48px;
width: 100%;
background-color: #ededed;
}
}
}
}
}
5 changes: 5 additions & 0 deletions src/components/editCqlLibrary/EditCqlLibrary.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ describe("Edit Cql Library Component", () => {
beforeEach(() => {
mockedAxios.get.mockClear();
mockedAxios.get.mockResolvedValue({ data: { ...cqlLibrary } });
global.ResizeObserver = class {
observe() {}
unobserve() {}
disconnect() {}
};
});

it("should render form and cql library editor", () => {
Expand Down
Loading

0 comments on commit ad54c9e

Please sign in to comment.