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 stretching issue in comment section on shifting detail page #7364

Closed
wants to merge 3 commits into from
Closed

Fix stretching issue in comment section on shifting detail page #7364

wants to merge 3 commits into from

Conversation

Thanush19
Copy link

@Thanush19 Thanush19 commented Mar 8, 2024

I have realigned the UI of the shift page and also added a "Read More" and "Read Less" option for comments with more than 30 words.

Closes #6637

@Thanush19 Thanush19 requested a review from a team as a code owner March 8, 2024 14:54
Copy link

vercel bot commented Mar 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2024 2:55pm

Copy link

netlify bot commented Mar 8, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 3bc2d61
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/65f15913cad95500088eb79a
😎 Deploy Preview https://deploy-preview-7364--care-egov-staging.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
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

Kindly link the issue in the PR using closing keywords and give a more targetted title for the PR (eg: "Fixes comment section in Shifting Details")

The PR title would come up in the changelog.

https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

@Thanush19 Thanush19 changed the title Comment box UI fix Fix stretching issue in comment section on shifting detail page Mar 10, 2024
@Thanush19
Copy link
Author

hey @rithviknishad , i haved renamed the PR and Issue i have resolved is Comment Section in the shifting detail page is stretching the page #6637 ( #6637)

@Thanush19 Thanush19 changed the title Fix stretching issue in comment section on shifting detail page Fixed stretching issue in comment section on shifting detail page Mar 10, 2024
@rithviknishad
Copy link
Member

@rithviknishad
Copy link
Member

rithviknishad commented Mar 10, 2024

Doing so will cause the PR to be linked to the issue and once the PR is merged, issue gets closed automatically.

@bodhish
Copy link
Member

bodhish commented Mar 10, 2024

I think we should publish a small section in the readme about commit messages;

@Thanush19 Thanush19 changed the title Fixed stretching issue in comment section on shifting detail page Fix stretching issue in comment section on shifting detail page (Closes #7364) Mar 10, 2024
@Thanush19 Thanush19 changed the title Fix stretching issue in comment section on shifting detail page (Closes #7364) Fix stretching issue in comment section on shifting detail page (Closes #6637) Mar 10, 2024
@Thanush19
Copy link
Author

is the PR title is okay now , if any changes need to be done , intimate me @rithviknishad ...

@rithviknishad rithviknishad changed the title Fix stretching issue in comment section on shifting detail page (Closes #6637) Fix stretching issue in comment section on shifting detail page Mar 10, 2024
id: string;
comment: string;
created_by_object: any;
Copy link
Member

Choose a reason for hiding this comment

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

Can we have proper types here? We have a pre-defined type: "PerformedByUserModel" which can be used here.

Copy link
Author

Choose a reason for hiding this comment

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

The 'PerformedByUserModel' interface does not have the required type that I need for the 'commentSection', so I can't use it here. Therefore, I defined a new interface.
export type UserBareMinimum = {
id: number;
username: string;
first_name: string;
last_name: string;
email: string;
user_type: UserRole;
last_login: string | undefined;
};

interface CommentProps {
id: string;
comment: string;
created_by_object: any;
modified_date: string;
}

Copy link
Member

Choose a reason for hiding this comment

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

It was already type-safe before you did the modifications. You've removed the types...

image

src/Components/Shifting/CommentsSection.tsx Show resolved Hide resolved
<p className="text-justify">
{expanded ? comment : truncatedComment}
{!expanded && remainingComment && (
<button onClick={toggleExpanded} className="ml-2 text-green-600">
Copy link
Member

Choose a reason for hiding this comment

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

Use primary color instead of green

Copy link

vercel bot commented Mar 13, 2024

@Thanush19 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

@rithviknishad
Copy link
Member

Closing as duplicate of #7402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comment Section in the shifting detail page is stretching the page
3 participants