Skip to content

Commit

Permalink
Reduce warning output (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-grant-work authored Apr 17, 2024
1 parent 909bf15 commit e469d74
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 42 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"primereact": "^10.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vscode-messenger": "^0.4.3",
"vscode-messenger-common": "^0.4.3",
"vscode-messenger-webview": "^0.4.3",
"vscode-messenger": "^0.4.5",
"vscode-messenger-common": "^0.4.5",
"vscode-messenger-webview": "^0.4.5",
"vscode-uri": "^3.0.8"
},
"devDependencies": {
Expand Down
18 changes: 10 additions & 8 deletions src/webview/hovers/address-hover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,16 @@ export class AddressHover implements HoverContribution {

const hoverItem = (
<table className='address-hover'>
{Object.entries({ binary, octal, decimal, hexadecimal, utf8 }).map(([label, value]) =>
value
? <tr className={`label-value-pair ${label === primaryRadix ? 'primary' : ''}`}>
<td className={`label ${label}`}>{label}</td>
<td className={`value ${label}`}>{value}</td>
</tr>
: ''
)}
<tbody>
{Object.entries({ binary, octal, decimal, hexadecimal, utf8 }).map(([label, value]) =>
value
? <tr className={`label-value-pair ${label === primaryRadix ? 'primary' : ''}`} key={label}>
<td className={`label ${label}`}>{label}</td>
<td className={`value ${label}`}>{value}</td>
</tr>
: ''
)}
</tbody>
</table>
);
return hoverItem;
Expand Down
18 changes: 10 additions & 8 deletions src/webview/hovers/data-hover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ export class DataHover implements HoverContribution {

const hoverItem = (
<table className='data-hover'>
{Object.entries({ binary, octal, decimal, hexadecimal, utf8 }).map(([label, value]) =>
value
? <tr className='label-value-pair'>
<td className={`label ${label}`}>{label}</td>
<td className={`value ${label}`}>{value}</td>
</tr>
: ''
)}
<tbody>
{Object.entries({ binary, octal, decimal, hexadecimal, utf8 }).map(([label, value]) =>
value
? <tr className='label-value-pair' key={label}>
<td className={`label ${label}`}>{label}</td>
<td className={`value ${label}`}>{value}</td>
</tr>
: ''
)}
</tbody>
</table>
);
return hoverItem;
Expand Down
2 changes: 1 addition & 1 deletion src/webview/hovers/hover-service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class HoverService {
} catch (err) {
messenger.sendRequest(logMessageType, HOST_EXTENSION, `Error in hover contribution ${contribution.id}: ${err}`);
}
return hoverPart;
return hoverPart && <div key={contribution.id}>{hoverPart}</div>;
});
const nodes = (await Promise.all(promises)).filter(node => !!node);
if (nodes.length > 0) {
Expand Down
18 changes: 10 additions & 8 deletions src/webview/hovers/variable-hover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ export class VariableHover implements HoverContribution {
const hoverItem = (
<table className='variable-hover'>
<caption className='variable-hover-name'>{name}</caption>
{Object.entries({ type, start, end, MAUs: maus, bytes }).map(([label, value]) =>
value
? <tr className='label-value-pair'>
<td className={`label ${label}`}>{label}</td>
<td className={`value ${label}`}>{value}</td>
</tr>
: ''
)}
<tbody>
{Object.entries({ type, start, end, MAUs: maus, bytes }).map(([label, value]) =>
value
? <tr className='label-value-pair' key={label}>
<td className={`label ${label}`}>{label}</td>
<td className={`value ${label}`}>{value}</td>
</tr>
: ''
)}
</tbody>
</table>
);

Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3365,24 +3365,24 @@ vary@~1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==

vscode-messenger-common@^0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/vscode-messenger-common/-/vscode-messenger-common-0.4.3.tgz#362e19eba84906c94521fab41522462b548c5f8c"
integrity sha512-6P7OlT7UthfMHe1IcSgv/5f7iELIAXUQ1wCQbciurJo6gwLHFAFqzg/F6TA7wJL5L1/0tyLSKMUWFa0HT/q0GA==
vscode-messenger-common@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/vscode-messenger-common/-/vscode-messenger-common-0.4.5.tgz#bc49a25d28808db9cc322cde029fed518c8fa382"
integrity sha512-opA+BEYTWdy1fFC3oOw30b0zc/KEuMtw+1pOiH5fEp+BGeA5xff7omSQTZeZJSDJszM471Vi+YY/ipRdRglAlQ==

vscode-messenger-webview@^0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/vscode-messenger-webview/-/vscode-messenger-webview-0.4.3.tgz#80b45af2ee3df5bdef11a80042c8ab63fd8490b1"
integrity sha512-/gyU6tDXI/rUFPDkKY7a5al7Y8Pv4OFrnqETcR3hex6o/LjAo6R41n6xmx5J7SC1OXYMjKzqs2og/5KZ09M/gA==
vscode-messenger-webview@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/vscode-messenger-webview/-/vscode-messenger-webview-0.4.5.tgz#89767aee50038acb6a706f5427e0fc72d5aec7f5"
integrity sha512-pzGB6HoTfPszMF4HQG+u5WMJ959iGLmow6ehYVTZnZjZ+phBKEBtpTYAjJSNotyUfZJ58NCdq5+ZSvMgkAuAJw==
dependencies:
vscode-messenger-common "^0.4.3"
vscode-messenger-common "^0.4.5"

vscode-messenger@^0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/vscode-messenger/-/vscode-messenger-0.4.3.tgz#9e07b16ef11335a9a0c21e75a338a5623e639c78"
integrity sha512-zOkWT/gXVvksYjtuTfGYWhc2Kn+OFDQl7w2P/LodFufC35tGo6tko28ACSJgvrIFeIhhI11XgMhlCGcT3QZGRA==
vscode-messenger@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/vscode-messenger/-/vscode-messenger-0.4.5.tgz#decf7475568ce3a3912479c29ff1e6eac61c7470"
integrity sha512-a6e54dpPRi/ITmVex49LGU6YXlqcuxGPlDPauvZig20G1D1/QD2E8GfhtvlTj3ml5aU/QV3LHghyepq3riy7sw==
dependencies:
vscode-messenger-common "^0.4.3"
vscode-messenger-common "^0.4.5"

vscode-uri@^3.0.8:
version "3.0.8"
Expand Down

0 comments on commit e469d74

Please sign in to comment.