Skip to content

Increase project description limit to 1000 characters#231

Merged
peripheralist merged 7 commits intojbx-protocol:mainfrom
aeolianeth:aeolianeth/increase-project-description-limit
Nov 29, 2021
Merged

Increase project description limit to 1000 characters#231
peripheralist merged 7 commits intojbx-protocol:mainfrom
aeolianeth:aeolianeth/increase-project-description-limit

Conversation

@aeolianeth
Copy link
Contributor

@aeolianeth aeolianeth commented Nov 26, 2021

Fixes #175

  • Increase project description limit to 1000 characters.
  • Improves layout of ProjectHeader for readability on small screens/mobile devices.

Screenshots

Before After
Screen Shot 2021-11-26 at 10 14 15 pm Screen Shot 2021-11-26 at 10 07 52 pm
Screen Shot 2021-11-26 at 10 14 46 pm Screen Shot 2021-11-26 at 10 11 17 pm
Screen Shot 2021-11-26 at 10 15 07 pm Screen Shot 2021-11-26 at 10 11 46 pm

With long descriptions

long-descr.mp4


<div style={{ flex: 1 }}>
<h1
<div
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here, we're moving the h1 and the project id under the same div. This way, we have more control over the project description layout

@aeolianeth
Copy link
Contributor Author

@peripheralist 👋 , mind taking a look at this one when you have a chance?

P.s. let me know how we should request reviews and who to ask 🙂

@peripheralist
Copy link
Contributor

@aeolianeth looking great, thanks for including the before/after pictures!

what do you think about also finding a way to show max 3-4 lines on the project page, with a "show more" option to expand it to show the rest? if a project does actually use a 1000 char description, it would be nice for it to not always be taking up so much space

@aeolianeth
Copy link
Contributor Author

@peripheralist totally agree! To keep the PR small, I'm happy to add this in a follow-up PR. WDYT?

@peripheralist
Copy link
Contributor

@peripheralist totally agree! To keep the PR small, I'm happy to add this in a follow-up PR. WDYT?

Let's try to get this UI improvement included here. That way if anyone updates their description to be real long before we get another PR done, it'll look nice right off the bat 😄

Looks like Antd includes a Paragraph component that supports this, I haven't used it before but it might only be a few lines of code to get a "read more" expand button in there https://ant.design/components/typography/

@aeolianeth
Copy link
Contributor Author

aeolianeth commented Nov 27, 2021

@peripheralist, totally, good call 🙏

I've created a new component ProjectDescription to handle this (see With long descriptions section of PR description for a video demo).

I had to update RichNote to use spans, but I checked all other uses of it and they look unaffected.

Let me know what you think!

@peripheralist
Copy link
Contributor

love it @aeolianeth ! this works great.

what do you think about moving the ProjectDescription component under shared/ as a more generic "Paragraph.tsx" component, where the maxLength could be passed in to props? I have a feeling we might wanna use this elsewhere 😊

also, i wouldn't mind leaving out the little arrow icon—i wonder if it draws more attention to the toggle button than it needs

@aeolianeth aeolianeth self-assigned this Nov 29, 2021
aeolianeth added 7 commits November 29, 2021 15:34
Here, we ensure that the project description
is the full width of the device on mobile.

We achieve this by:
- Moving the project id/settings section
and the h1 into the same div.
- Setting a max-width on the project
description. 700px is the recommended
width for most efficient reading of text
This component includes logic for expanding
and contracting long descriptions.
@aeolianeth
Copy link
Contributor Author

@peripheralist

what do you think about moving the ProjectDescription component under shared/ as a more generic "Paragraph.tsx" component, where the maxLength could be passed in to props? I have a feeling we might wanna use this elsewhere 😊

Love this idea - done!

Here's a screenshot, (i didn't update the demo video in the description:)

Screen Shot 2021-11-29 at 3 41 58 pm

@peripheralist
Copy link
Contributor

yes! awesome work, thank you

@peripheralist peripheralist merged commit ac01437 into jbx-protocol:main Nov 29, 2021
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.

[IDEA] Increase character limit of project description

2 participants