Skip to content

Commit 656c941

Browse files
authored
Merge pull request #44327 from nextcloud/backport/44236/stable28
[stable28] fix(settings): apps list layout
2 parents de7d937 + d14071e commit 656c941

File tree

8 files changed

+68
-17
lines changed

8 files changed

+68
-17
lines changed

apps/settings/css/settings.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ span.version {
639639

640640
#apps-list.store {
641641
.section {
642+
position: relative;
642643
border: 0;
643644
}
644645

@@ -796,6 +797,15 @@ span.version {
796797
}
797798
}
798799

800+
/* On even narrower screens, hide the app image */
801+
@media only screen and (max-width: 512px) {
802+
.apps-list.installed {
803+
.app-image {
804+
display: none !important;
805+
}
806+
}
807+
}
808+
799809
@media only screen and (max-width: 500px) {
800810
.apps-list.installed .app-groups {
801811
display: none !important;
@@ -898,6 +908,9 @@ span.version {
898908

899909
&.installed {
900910
.apps-list-container {
911+
// For positioning AppItem link
912+
// See AppItem.vue
913+
position: relative;
901914
display: table;
902915
width: 100%;
903916
height: auto;
@@ -987,7 +1000,6 @@ span.version {
9871000
}
9881001

9891002
.section {
990-
position: relative;
9911003
flex: 0 0 auto;
9921004

9931005
h2.app-name {

apps/settings/src/components/AppList/AppItem.vue

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
<component :is="dataItemTag"
4848
class="app-name"
4949
:headers="getDataItemHeaders(`app-table-col-name`)">
50-
<router-link class="app-name--link" :to="{ name: 'apps-details', params: { category: category, id: app.id }}"
50+
<router-link class="app-name--link"
51+
:to="{ name: 'apps-details', params: { category: category, id: app.id }}"
5152
:aria-label="t('settings', 'Show details for {appName} app', { appName:app.name })">
5253
{{ app.name }}
5354
</router-link>
@@ -205,13 +206,51 @@ export default {
205206
width: 100%;
206207
}
207208
208-
.app-name--link::after {
209-
content: '';
210-
position: absolute;
211-
top: 0;
212-
left: 0;
213-
right: 0;
214-
bottom: 0;
209+
// Note: because of Safari bug, we cannot position link overlay relative to the table row
210+
// See: https://bugs.webkit.org/show_bug.cgi?id=240961
211+
// So we need to manually position it relative to the entire table container and cell
212+
// This is a simple solution to fix the bag in Nextcloud 28
213+
// Nextcloud 29+ has a proper fix in a refactored app list
214+
// See: https://github.com/nextcloud/server/pull/44236/
215+
.apps-list-container {
216+
.app-name {
217+
padding: 0 6px;
218+
}
219+
220+
.app-name--link {
221+
// table cell padding defined by settings.scss
222+
--app-item-padding: 6px;
223+
--app-item-height: calc(2 * 6px + var(--default-clickable-area));
224+
height: var(--app-item-height);
225+
display: flex;
226+
align-items: center;
227+
}
228+
229+
.app-name--link::after {
230+
content: '';
231+
position: absolute;
232+
left: 0;
233+
right: 0;
234+
height: var(--app-item-height);
235+
}
236+
237+
.actions {
238+
// Prevent table to have increased height when action buttons takes much space
239+
display: flex !important;
240+
flex-wrap: nowrap !important;
241+
}
215242
}
216243
244+
// In the store view we can stretch the link to the entire cell,
245+
// because it is a block and it can have position relative
246+
.apps-store-view {
247+
.app-name--link::after {
248+
content: '';
249+
position: absolute;
250+
top: 0;
251+
left: 0;
252+
right: 0;
253+
bottom: 0;
254+
}
255+
}
217256
</style>

dist/settings-apps-view-4529.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-apps-view-4529.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-apps-users-management.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-apps-users-management.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)