sg-wireless / pymakr-vsc

GNU General Public License v3.0
97 stars 25 forks source link

feat: add rootpath to deviceInfo hover and highlight alerts #257

Closed Josverl closed 2 years ago

Josverl commented 2 years ago

allows for the rootpaath to be viewed also improved the layout a bit and trimmed down the number of attributes shown as the dialog was getting quite large.

I have tried to add some styling in order to get the MD/HTML tables columns to line up; but this is not that simple apparently. currently only the warning is styled so it jumps out more.

Another use of styling could be to build one large MD/HTML table and then highlight the rows / sections the sections rather than use ### Headings

ref: https://stackoverflow.com/questions/67749752/how-to-apply-styling-and-html-tags-on-hover-message-with-vscode-api/67954180#67954180

below works well in MD, but appears to be filtered in VSCode

<style>
# full width tables 
table  {width: 100%;}
# decrease font 
tbody td {font-size: 12px;  }
# coloumns 30 - 70%
tbody td:first-child {width: 30%;}
tbody td:nth-child(2) {width: 70%;}
# first r/c larger 
tbody tr:first-child td:first-child {font-size: 16px;  }
# zebra 
tbody tr:nth-child(odd)  {background: #1C6EA4;} 
</style>
jakobrosenberg commented 2 years ago

Can't believe VSCode let you change the color. I'm 99% sure I tried it with no luck. Probably a typo. 😅

As for equal width columns, we can either create a unified table with COLSPAN for headers or we can let objectToTable take width parameters.

Great idea with the root path entry. That's a must have.

Lastly, it's also possible to have the hover info in columns to reduce the height, but I doubt anyone's working on a <865 px screen these days. That said, it might be a cleaner look. 🤷

jakobrosenberg commented 2 years ago

:tada: This PR is included in version 2.17.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: