Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better overflow and wrapping in Status area #7850

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Code cleanup.
  • Loading branch information
charlesh88 committed Sep 19, 2024
commit 2094521f20f3f3dcc32145e81d02aa435f4b52b2
12 changes: 6 additions & 6 deletions src/ui/layout/status-bar/StatusIndicators.vue
Copy link
Contributor

@davetsay davetsay Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charlesh88 , I think we can do this without the usage of nextTick.

I'll take a crack at this.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
type: Boolean,
required: false,
default() {
return false;

Check warning on line 44 in src/ui/layout/status-bar/StatusIndicators.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/status-bar/StatusIndicators.vue#L44

Added line #L44 was not covered by tests
}
}
},
Expand All @@ -60,30 +60,30 @@
return [...this.indicators].sort((a, b) => b.value.priority - a.value.priority);
}
},
watch: {
contentUpdated() {
// console.log('content updated');
// this.checkOverflow();
}
},
// watch: {
// contentUpdated() {
// console.log('content updated');
// this.checkOverflow();
// }
// },
mounted() {
if (this.listenForOverflow) {
window.addEventListener('load', this.checkOverflow);
window.addEventListener('resize', this.checkOverflow);

Check warning on line 72 in src/ui/layout/status-bar/StatusIndicators.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/status-bar/StatusIndicators.vue#L71-L72

Added lines #L71 - L72 were not covered by tests
}
},
beforeUnmount() {
this.openmct.indicators.off('addIndicator', this.addIndicator);
if (this.listenForOverflow) {
window.removeEventListener('load', this.checkOverflow);
window.removeEventListener('resize', this.checkOverflow);

Check warning on line 79 in src/ui/layout/status-bar/StatusIndicators.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/status-bar/StatusIndicators.vue#L78-L79

Added lines #L78 - L79 were not covered by tests
}
},
updated() {
// console.log('updated');
if (this.listenForOverflow) {
window.addEventListener('resize', this.checkOverflow);
this.checkOverflow();

Check warning on line 86 in src/ui/layout/status-bar/StatusIndicators.vue

View check run for this annotation

Codecov / codecov/patch

src/ui/layout/status-bar/StatusIndicators.vue#L85-L86

Added lines #L85 - L86 were not covered by tests
} else {
window.removeEventListener('resize', this.checkOverflow);
this.checkOverflow();
Expand Down
Loading