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

fix: Now you can't type more than 255 characters in the bio field of user settings #2615

Open
wants to merge 19 commits into
base: beta
Choose a base branch
from

Conversation

Pagla-Dasu
Copy link

Now, it Can't keep typing in the bio field of user settings after 255 characters. Changed the code in user-sttings-page.tsx

fix #2612

Description

This PR fixes the issue #2612 fixing the maximum character issue of 255 characters.

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Please use this format link issue numbers: Fixes #2612
#2612

Mobile & Desktop Screenshots/Recordings

Steps to QA

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

…d after 255 characters

(70) Now, it Can't keep typing in the bio field of user settings after 255 characters. Changed the
code in user-sttings-page.tsx

fix open-sauced#2612
Copy link

netlify bot commented Feb 7, 2024

πŸ‘· Deploy request for oss-insights pending review.

Visit the deploys page to approve it

Name Link
πŸ”¨ Latest commit c7ba1fb

Copy link

netlify bot commented Feb 7, 2024

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit c7ba1fb
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/6656232be664ae00093ce45f
😎 Deploy Preview https://deploy-preview-2615--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Compliance Checks Passed!

{bio?.length}/255
</p>
)}
<p aria-live="polite" className="text-xs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BekahHW do you think being unable to type further and seeing 255/255 in the UI is clear enough? If not we can put a message along the lines of max length of bio reached when they hit 255 characters. The browser won't allow anymore characters because of the maxLength here which is what I proposed in the good first issue linked to this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickytonline how about we do the same as #2587 just to be consistent? πŸ™‚

SCR-20240216-immd

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, idk how I missed this.

We could put a message there, but I think the highlight one is too much here bc the input is so small.

This is what it currently looks like when it's too long:

image

What if we keep the 255/255 and have a message that says Bio Max Length underneath?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we decide on something for this @BekahHW?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickytonline I think my last suggestion is the way to go.

255/255 in red
Message: Bio Max Length in red

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @Pagla-Dasu! Just getting some feedback from my co-worker about the fix I proposed for this issue.

@nickytonline nickytonline changed the title fix(user-settings-page.tsx): Now,it Can't keep typing in the bio field after 255 characters fix: Now you can't type more than 255 characters in the bio field of user settings Feb 7, 2024
@Pagla-Dasu
Copy link
Author

@nickytonline you're welcome πŸ‘πŸΌ

@Pagla-Dasu
Copy link
Author

@nickytonline , Any update on the PR?

@nickytonline
Copy link
Member

There are failures because of linting/prettier.

./components/organisms/UserSettingsPage/user-settings-page.tsx
284:30  Error: Replace `Β·=Β·` with `=`  prettier/prettier
2[91](https://github.com/open-sauced/app/actions/runs/7821446623/job/21339420324?pr=2615#step:6:92):1  Error: Replace `+················{bio?.length}/255⏎+` with `················+·{bio?.length}/255·+{"·"}⏎·`  prettier/prettier

run npm lint -- --fix to fix that.

@Pagla-Dasu
Copy link
Author

@nickytonline , The prettier issue is fixed, you can now merge the code.

Copy link
Member

@BekahHW BekahHW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things:

  1. Let's add the message if the bio hits max
  2. There's something going on with '+' signs here. Let's make sure those are removed.
image

@BekahHW
Copy link
Member

BekahHW commented Apr 19, 2024

@Pagla-Dasu how are things going here?

@Pagla-Dasu
Copy link
Author

@Pagla-Dasu how are things going here?

oh, I am so sorry @BekahHW, I missed your request for those changes. Will get that done asap.

@Pagla-Dasu
Copy link
Author

@nickytonline @BekahHW, do check the commit. The changes are made accordingly.

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.

Bug: Can keep typing in the bio field of user settings after 255 characters
4 participants