stakwork / sphinx-tribes-frontend

Frontend for sphinx tribes and bounties. The bounty platform that pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
12 stars 42 forks source link

Prevent spaces in bounty title, bounty description, and acceptance criteria during bounty creation #266

Closed aliraza556 closed 8 months ago

aliraza556 commented 8 months ago

Describe the bug A user is able to create a bounty with spaces inside of a bounty title, description, and acceptance criteria. The next button is also enabled when someone types in a space during Step 2 when a title is filled with a space.

Demo https://www.loom.com/share/f592786c5e3f40ed9973ba3f8a885b2e

Expected behavior

  1. If a space is entered in the bounty title by itself, it is not registered.
  2. If a space is entered in the description by itself, it is not registered.
  3. If a space is entered in the acceptance criteria by itself, it is not registered.
  4. Unnecessary spaces should be trimmed at the beginning and end of the title description, bounty description, and acceptance criteria if there is a text
  5. The "Next" button should only be enabled the bounty title is validly filled i.e. no fields with just spaces https://www.loom.com/share/3232d8abc05049ffb4e2a4701a15696b

Desktop (please complete the following information):

Acceptance Criteria

aliraza556 commented 8 months ago

Hi @ecurrencyhodler, Please assign me

ecurrencyhodler commented 8 months ago

@aliraza556 are you saying that you want to disable the "next" button on step #2 if they add a space in the title?

aliraza556 commented 8 months ago

@aliraza556 are you saying that you want to disable the "next" button on step #2 if they add a space in the title?

Yes Step: 2 and Step:3

aliraza556 commented 8 months ago

Hi @ecurrencyhodler If the bounty title contains white spaces, then the bounty display appears as follows: https://i.imgur.com/5ue4oJH.png

2nd - image

aliraza556 commented 8 months ago

@ecurrencyhodler Bug Demo: https://www.loom.com/share/f592786c5e3f40ed9973ba3f8a885b2e

Expected Behavior: https://www.loom.com/share/3232d8abc05049ffb4e2a4701a15696b

Please check it.

ecurrencyhodler commented 8 months ago

Hmmm I'm not sure how I feel about preventing spaces. Let me talk to my designer about this.

aliraza556 commented 8 months ago

Sure, I understand your concerns about preventing spaces and the importance of discussing it with your designer. In the meantime, I have a related question: Why is the Next button disabled? If the Bounty title (Step 2) and description (Step 3) are not mandatory for our process, could we consider removing the functionality that disables the Next button?

aliraza556 commented 8 months ago

Hi @ecurrencyhodler, Please review this PR #283