Skip to content

Commit d027d12

Browse files
authored
Merge pull request #1448 from ASU/ws2-2190-wbdr
Fix profile squishing grif view
2 parents c9acac4 + ae13044 commit d027d12

File tree

2 files changed

+48
-30
lines changed

2 files changed

+48
-30
lines changed

packages/app-webdir-ui/src/WebDirectoryComponent/index.stories.js

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export default {
1111
control: "select",
1212
options: ["true", "false"],
1313
},
14+
columnView: {
15+
control: "select",
16+
options: ["50%"],
17+
description: "50% mimics the webspark 2 column layout",
18+
},
1419
},
1520
args: { alphaFilter: "false" },
1621
decorators: [story => <FullLayout>{story()}</FullLayout>],
@@ -40,48 +45,60 @@ const filters = {
4045
export const webDirectoryExampleDepartments = args => {
4146
return (
4247
<div className="uds-content-align">
43-
<WebDirectory
44-
searchType="departments"
45-
deptIds="1349,1353,32397,1518,1520,3534,1350,334996,1504,2000,2003,159390"
46-
API_URL="https://test-asu-isearch.ws.asu.edu"
47-
searchApiVersion="/api/v1/"
48-
filters={filters}
49-
display={{...display, grid: "true"}}
50-
alphaFilter={args.alphaFilter}
51-
// appPathFolder="/my/custom/path/to/component/root/example"
52-
/>
48+
<div className="row">
49+
<div className={args.columnView === "50%" ? "col-md-6" : ""}>
50+
<WebDirectory
51+
searchType="departments"
52+
deptIds="1349,1353,32397,1518,1520,3534,1350,334996,1504,2000,2003,159390"
53+
API_URL="https://test-asu-isearch.ws.asu.edu"
54+
searchApiVersion="/api/v1/"
55+
filters={filters}
56+
display={{ ...display, grid: "false" }}
57+
alphaFilter={args.alphaFilter}
58+
// appPathFolder="/my/custom/path/to/component/root/example"
59+
/>
60+
</div>
61+
</div>
5362
</div>
5463
);
5564
};
5665

5766
export const webDirectoryExamplePeople = args => {
5867
return (
5968
<div className="uds-content-align">
60-
<WebDirectory
61-
searchType="people"
62-
ids="mcrow:454517,mdenke:1350,jagarc50:1350,lhillzev:1353"
63-
API_URL="https://test-asu-isearch.ws.asu.edu"
64-
searchApiVersion="/api/v1/"
65-
display={display}
66-
alphaFilter={args.alphaFilter}
67-
// appPathFolder="/my/custom/path/to/component/root/example"
68-
/>
69+
<div className="row">
70+
<div className={args.columnView === "50%" ? "col-md-6" : ""}>
71+
<WebDirectory
72+
searchType="people"
73+
ids="mcrow:454517,mdenke:1350,jagarc50:1350,lhillzev:1353"
74+
API_URL="https://test-asu-isearch.ws.asu.edu"
75+
searchApiVersion="/api/v1/"
76+
display={display}
77+
alphaFilter={args.alphaFilter}
78+
// appPathFolder="/my/custom/path/to/component/root/example"
79+
/>
80+
</div>
81+
</div>
6982
</div>
7083
);
7184
};
7285

7386
export const webDirectoryExampleDepartmentsAndPeople = args => {
7487
return (
7588
<div className="uds-content-align">
76-
<WebDirectory
77-
searchType="people_departments"
78-
ids=",tgrandli:1344,mcrow:1343,jcunnin8:1358,ccherrer:1358,csmudde:1358"
79-
API_URL="https://test-asu-isearch.ws.asu.edu"
80-
searchApiVersion="/api/v1/"
81-
display={display}
82-
alphaFilter={args.alphaFilter}
83-
// appPathFolder="/my/custom/path/to/component/root/example"
84-
/>
89+
<div className="row">
90+
<div className={args.columnView === "50%" ? "col-md-6" : ""}>
91+
<WebDirectory
92+
searchType="people_departments"
93+
ids=",tgrandli:1344,mcrow:1343,jcunnin8:1358,ccherrer:1358,csmudde:1358"
94+
API_URL="https://test-asu-isearch.ws.asu.edu"
95+
searchApiVersion="/api/v1/"
96+
display={display}
97+
alphaFilter={args.alphaFilter}
98+
// appPathFolder="/my/custom/path/to/component/root/example"
99+
/>
100+
</div>
101+
</div>
85102
</div>
86103
);
87104
};

packages/unity-bootstrap-theme/src/scss/extends/_person-profile.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,13 @@ Desktop styles
126126
margin-bottom: 16px;
127127
.profile-img-placeholder {
128128
width: var(--grid-pic-size);
129-
height: var(--grid-pic-size);
129+
height: fit-content;
130130
max-width: 100%;
131131
.profile-img {
132132
width: var(--grid-pic-size);
133-
height: var(--grid-pic-size);
134133
max-width: 100%;
134+
height: auto;
135+
aspect-ratio: 1 / 1;
135136
}
136137
}
137138
}

0 commit comments

Comments
 (0)