Skip to content

Commit b166d4b

Browse files
authored
Merge pull request #53257 from nextcloud/backport/41065/stable30
[stable30] perf(dashboard): lags on dashboard items drag
2 parents e7f604d + effb8c9 commit b166d4b

File tree

3 files changed

+7
-24
lines changed

3 files changed

+7
-24
lines changed

apps/dashboard/src/DashboardApp.vue

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,10 @@
2424
class="panel">
2525
<div class="panel--header">
2626
<h2>
27-
<img v-if="apiWidgets[panels[panelId].id].icon_url"
28-
:alt="apiWidgets[panels[panelId].id].title + ' icon'"
29-
:src="apiWidgets[panels[panelId].id].icon_url"
30-
aria-hidden="true">
31-
<span v-else
32-
:aria-labelledby="`panel-${panels[panelId].id}--header--icon--description`"
33-
aria-hidden="true"
34-
:class="apiWidgets[panels[panelId].id].icon_class"
35-
role="img" />
27+
<img v-if="apiWidgets[panels[panelId].id].icon_url" :src="apiWidgets[panels[panelId].id].icon_url" alt="">
28+
<span v-else :class="apiWidgets[panels[panelId].id].icon_class" aria-hidden="true" />
3629
{{ apiWidgets[panels[panelId].id].title }}
3730
</h2>
38-
<span :id="`panel-${panels[panelId].id}--header--icon--description`" class="hidden-visually">
39-
{{ t('dashboard', '"{title} icon"', { title: apiWidgets[panels[panelId].id].title }) }}
40-
</span>
4131
</div>
4232
<div class="panel--content">
4333
<ApiDashboardWidget :widget="apiWidgets[panels[panelId].id]"
@@ -48,13 +38,9 @@
4838
<div v-else :key="panels[panelId].id" class="panel">
4939
<div class="panel--header">
5040
<h2>
51-
<span :aria-labelledby="`panel-${panels[panelId].id}--header--icon--description`"
52-
aria-hidden="true"
53-
:class="panels[panelId].iconClass"
54-
role="img" />
41+
<span :class="panels[panelId].iconClass" aria-hidden="true" />
5542
{{ panels[panelId].title }}
5643
</h2>
57-
<span :id="`panel-${panels[panelId].id}--header--icon--description`" class="hidden-visually"> {{ t('dashboard', '"{title} icon"', { title: panels[panelId].title }) }} </span>
5844
</div>
5945
<div class="panel--content" :class="{ loading: !panels[panelId].mounted }">
6046
<div :ref="panels[panelId].id" :data-id="panels[panelId].id" />
@@ -102,10 +88,7 @@
10288
:checked="isActive(panel)"
10389
@input="updateCheckbox(panel, $event.target.checked)">
10490
<label :for="'panel-checkbox-' + panel.id" :class="{ draggable: isActive(panel) }">
105-
<img v-if="panel.iconUrl"
106-
:alt="panel.title + ' icon'"
107-
:src="panel.iconUrl"
108-
aria-hidden="true">
91+
<img v-if="panel.iconUrl" alt="" :src="panel.iconUrl">
10992
<span v-else :class="panel.iconClass" aria-hidden="true" />
11093
{{ panel.title }}
11194
</label>

dist/dashboard-main.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/dashboard-main.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)