Skip to content

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Port components to ts 5 #2724

wants to merge 17 commits into from

Conversation

RoyEJohnson
Copy link
Contributor

@RoyEJohnson RoyEJohnson commented Apr 10, 2025

CORE-870
This is based on #2723 which should be merged before reviewing this.

@RoyEJohnson RoyEJohnson force-pushed the port-components-to-ts-5 branch from 6459baf to f9bb84d Compare April 10, 2025 15:32
@@ -220,7 +220,6 @@ function ShareButtons() {
message={encodeURIComponent(
'Check out this OpenStax blog article!'
)}
minimal={true}
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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}
Copy link
Contributor Author

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.

@RoyEJohnson RoyEJohnson force-pushed the port-components-to-ts-5 branch 5 times, most recently from f1ec16a to 7460bbe Compare April 10, 2025 16:35
const [listening, setListening] = React.useState(false);
const {webtocaseUrl, debug, oid} = useSalesforceContext();
Copy link
Contributor Author

@RoyEJohnson RoyEJohnson Apr 10, 2025

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}) {
Copy link
Contributor Author

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';
Copy link
Contributor Author

@RoyEJohnson RoyEJohnson Apr 10, 2025

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}) {
Copy link
Contributor Author

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', () => {
Copy link
Contributor Author

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.

@RoyEJohnson RoyEJohnson force-pushed the port-components-to-ts-5 branch from 7460bbe to a72dc4c Compare May 1, 2025 22:15
@RoyEJohnson RoyEJohnson force-pushed the port-components-to-ts-5 branch from a72dc4c to 24a1df4 Compare May 9, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant