Conversation
Well... There are actually a lot of unused classes, set as warning first, as I am not sure if it is actually safe to remove them, because some classes looks like reference to global classes like |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where monitor names are truncated/cropped in the monitor list, particularly when monitors are nested in groups. It refactors how the monitor name column's width is determined, replacing static Bootstrap column classes with a computed property, and moves CSS class definitions to the correct component. It also introduces eslint-plugin-vue-scoped-css to catch unused scoped CSS selectors going forward.
Changes:
- Fixes monitor name column width by using a computed
monitorItemproperty that appliescol-9 col-xl-6for the normal heartbeat bar layout, andmonitor-itemfor the full-width (bottom/none) layout. - Removes misplaced CSS rules (
.monitor-item,.bottom-style,.actions-row) fromMonitorList.vueand adds the correct.bottom-styletoMonitorListItem.vue. - Adds
eslint-plugin-vue-scoped-cssas a dev dependency and configures it in ESLint.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/MonitorListItem.vue |
Replaces static column classes with a computed monitorItem property; adds .bottom-style CSS rule |
src/components/MonitorList.vue |
Removes misplaced .monitor-item, .bottom-style, and .actions-row CSS rules |
package.json |
Adds eslint-plugin-vue-scoped-css dev dependency; modifies lint:js-prod script |
package-lock.json |
Lockfile updates for the new dependency |
.eslintrc.js |
Enables vue-scoped-css/vue3-recommended and vue-scoped-css/no-unused-selector rule |
Summary
Resolves #5981
I also found that some css classes were missing/wrong place, probably due to unknown refactor pull requests. Add
eslint-plugin-vue-scoped-cssto prevent such things.Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
Screenshots for Visual Changes
Before:

After:
