Skip to content

Commit 12d60ad

Browse files
authored
feat(frontend): Improve mobile and tablet responsive layouts (#223)
Improved the mobile and tablet user experience with a more compact and usable layout. Fixed - the output text container was appearing outside of viewport for certain screen sizes UI/UX Changes for tablet and mobile viewports. Original and default layout remains the same: - CSS fix for overflow and displaying containers outside of viewport - Set up responsive design with media queries - Reordered buttons for better cohesion with cogstack color theme: Deidentify and Use Example buttons first, then Redact checkbox below - Reduced padding and gaps throughout mobile layout for more compact design - Fixed scrolling issues on viewports <1280px by properly constraining viewport-container height - Reduced border sizes on mobile from 15px to 5px for cleaner appearance - Reorganised mobile middle container for logo to be a watermark background Bug fix - Removed unused import that called defunct variable (deid_text) from views.py
1 parent 6c75531 commit 12d60ad

File tree

3 files changed

+438
-14
lines changed

3 files changed

+438
-14
lines changed

anoncat-demo-app/app/anoncat/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from django.shortcuts import render
22
from medcat.cat import CAT
3-
from medcat.utils.ner import deid_text
43
from rest_framework.decorators import api_view
54
from rest_framework.response import Response
65

anoncat-demo-app/app/frontend/src/App.vue

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<div class="title">
44
<div class="cs-title">
55
<img src="./assets/cs-logo.png" class="logo">
6-
CogStack
6+
<span class="cs-text">CogStack</span>
77
</div>
88
<div class="app-title">
9-
Anon
9+
<span class="anon-text">Anon</span>
1010
<img src="./assets/logo.png" class="logo">
11-
AT
11+
<span class="anon-text">AT</span>
1212
</div>
1313
<span class="help">
1414
<v-icon icon="mdi-help-circle-outline" @click="helpModal = true"></v-icon>
@@ -202,5 +202,87 @@ export default {
202202
}
203203
}
204204
205+
/* Mobile header adjustments */
206+
@media (max-width: 767px) {
207+
.wrapper {
208+
height: 120px !important;
209+
}
210+
211+
.title {
212+
display: flex;
213+
flex-direction: column;
214+
align-items: center;
215+
padding: 10px;
216+
}
217+
218+
.cs-title {
219+
width: 100%;
220+
text-align: center;
221+
font-size: 24px;
222+
margin-bottom: 5px;
223+
}
224+
225+
.cs-title .logo {
226+
height: 32px;
227+
}
228+
229+
.app-title {
230+
width: 100%;
231+
padding: 0;
232+
font-size: 36px;
233+
text-align: center;
234+
}
235+
236+
.app-title .logo {
237+
height: 36px;
238+
}
239+
240+
.help {
241+
top: 10px;
242+
right: 10px;
243+
font-size: 20px;
244+
}
245+
}
246+
247+
@media (min-width: 768px) and (max-width: 1023px) {
248+
.wrapper {
249+
height: 130px !important;
250+
}
251+
252+
.title {
253+
display: flex;
254+
flex-direction: column;
255+
align-items: center;
256+
padding: 15px 10px;
257+
}
258+
259+
.cs-title {
260+
width: 100%;
261+
text-align: center;
262+
font-size: 28px;
263+
margin-bottom: 8px;
264+
}
265+
266+
.cs-title .logo {
267+
height: 40px;
268+
}
269+
270+
.app-title {
271+
width: 100%;
272+
padding: 0;
273+
font-size: 48px;
274+
text-align: center;
275+
}
276+
277+
.app-title .logo {
278+
height: 48px;
279+
}
280+
281+
.help {
282+
top: 15px;
283+
right: 15px;
284+
}
285+
}
286+
205287
206288
</style>

0 commit comments

Comments
 (0)