-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
chore(suite): interface cleanup for TroubleshootingTips #17972
chore(suite): interface cleanup for TroubleshootingTips #17972
Conversation
🔍🌐 Suite Web test results: View in Currents |
🔍🖥️ Suite Desktop test results: View in Currents |
@@ -81,15 +81,15 @@ export const DeviceConnect = ({ setIsBluetoothConnectOpen }: DeviceConnectProps) | |||
|
|||
return ( | |||
<TroubleshootingTipsWithSections | |||
label={<Translation id="TR_TREZOR_SAFE_7" />} | |||
label={<Translation id="TR_CONNECTION_TYPE" />} | |||
ctaLabel={<Translation id="TR_TREZOR_SAFE_7" />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before → after:
sectionLabel
→label
label
→ctaLabel
label
is now the same thing for TroubleshootingTipsWithSections
and for TroubleshootingTips
, which was the most confusing thing for me personally..
Visually it is the most prominent label, as it headlines the table, so it makes sense that the name reflects that this is the label.
ctaLabel
now actually behaves analogically to toggleText
– it is just custom override, and if not supplied, a default will be used (label
for cta, constant for toggle).
Here is currently the only usage of the ctaLabel
override...
const [selectedSection, setSelectedSection] = useState<K>(defaultSection); | ||
const [isOpened, setIsOpened] = useState(initiallyIsOpen === true); | ||
const firstSectionKey = Object.keys(items)[0] as K; | ||
const [selectedSection, setSelectedSection] = useState<K>(defaultSection ?? firstSectionKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
018d365
to
e2a5b9d
Compare
Description
Ex post CR suggestions for #17925
Mainly refactor props, IMO more intuitive now and without too many diffs.
And small nits
Screenshots:
Proof that I did not mess up the order of the props:



BT on
BT off
What we've got here is failure to communicate
@coderabbitai ignore