Skip to content
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

Type Error in Picture Configuration Options #1902

Open
1 task done
Nikhil-Singhal-06 opened this issue May 17, 2024 · 2 comments
Open
1 task done

Type Error in Picture Configuration Options #1902

Nikhil-Singhal-06 opened this issue May 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version

Comments

@Nikhil-Singhal-06
Copy link

Is there an existing issue for this?

  • Yes, I have searched the existing issues and none of them match my problem.

Product Variant

Cloud (https://rxresu.me)

Current Behavior

In the Basics section, under the picture configuration options, when a user clicks on the already selected aspect ratio or border radius, a type error is thrown.

Expected Behavior

The application should simply recognize the selection as already active and maintain the current state.

Steps To Reproduce

No response

What browsers are you seeing the problem on?

Chrome

What template are you using?

None

Anything else?

No response

@Nikhil-Singhal-06 Nikhil-Singhal-06 added bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version labels May 17, 2024
@DemaPy
Copy link
Contributor

DemaPy commented May 22, 2024

@AmruthPillai Hi, I found where problem lies.
You just have to add additional check if value is toggled.
If user click on the same value aspect ratio again, value will be empty string,

Currently selected: 0.75 which is portrait.
Which is result undefined here;
const stringToRatioMap = { square: 1, portrait: 0.75, horizontal: 1.33, } as const;
const onAspectRatioChange = (value: AspectRatio) => { setValue("basics.picture.aspectRatio", stringToRatioMap[value]); };

Screenshot 2024-05-22 122618

Also I found another one issue with input, for aspect ratio. When input is empty. (Patch request failed every time when user clear input to change aspect ratio)

DemaPy added a commit to DemaPy/Reactive-Resume that referenced this issue May 22, 2024
@DemaPy
Copy link
Contributor

DemaPy commented May 22, 2024

@AmruthPillai I have created pull request: #1909

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issues that need to be triaged v4 Issues related to the latest version
Projects
None yet
Development

No branches or pull requests

3 participants