-
Notifications
You must be signed in to change notification settings - Fork 5
Port components to ts 5 #2724
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
base: main
Are you sure you want to change the base?
Port components to ts 5 #2724
Conversation
6459baf
to
f9bb84d
Compare
@@ -220,7 +220,6 @@ function ShareButtons() { | |||
message={encodeURIComponent( | |||
'Check out this OpenStax blog article!' | |||
)} | |||
minimal={true} |
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.
The share component is only being used in in this place, which used the minimal
option, so I made it not an option.
justify-content: center; | ||
margin: 1rem 0; | ||
|
||
&:not(.minimal) { |
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.
The minimal
option is the only way it was being called, so I got rid of the non-minimal configuration
@@ -19,37 +24,39 @@ function RenderItem({item, current, onMouseEnter, onClick}) { | |||
onMouseEnter={onMouseEnter} | |||
onClick={onClick} | |||
> | |||
{item.label || item.text} |
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.
Everything that uses it now has label
, not text
.
f1ec16a
to
7460bbe
Compare
const [listening, setListening] = React.useState(false); | ||
const {webtocaseUrl, debug, oid} = useSalesforceContext(); |
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.
Nothing uses webtocaseUrl anymore (postTo is always supplied)
@@ -1,35 +1,21 @@ | |||
import React from 'react'; | |||
import useSalesforceContext from '~/contexts/salesforce'; | |||
|
|||
export function HiddenFields({leadSource}) { |
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.
Nothing uses HiddenFields anymore
@@ -0,0 +1,21 @@ | |||
import React from 'react'; |
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.
This was moved from being its own component to being part of body-units, since nothing else used it. Also simplified it a bit, since there was an image feature that wasn't being used, and with that gone, the quote-bucket
wrapper wasn't needed.
@@ -1,17 +1,12 @@ | |||
import React from 'react'; | |||
import './progress-ring.scss'; | |||
|
|||
function Circle({basicProps, className, strokeDashoffset=0}) { |
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.
I wasn't abstracting anything! It was a useless layer of component.
return activeButton.textContent; | ||
} | ||
|
||
describe('paginator', () => { |
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.
Didn't have a describe wrapper on it before, so it updates all the lines. Only had one test before; now two, so not a big file anyway.
7460bbe
to
a72dc4c
Compare
(plus some imports that needlessly specify .js)
a72dc4c
to
24a1df4
Compare
CORE-870
This is based on #2723 which should be merged before reviewing this.