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

style: position sticky in the DealDetails component #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

7pulse
Copy link

@7pulse 7pulse commented Sep 23, 2024

Description

Changing the position to sticky for the component improves the UX. Whenever the user scrolls to the bottom when filling the form, the information on the right sticks with the process itself, being related to the form.

Screenshot

image

PR Requirements

  • [ x] I have carefully read through and understand the Deals-for-Devs Contributing Guide
  • [ x] The title of this PR follows the Conventional Commits format
  • [ x] The Description gives a good representation of the changes made
  • If this PR addresses an open Issue, it is linked in the Issue section

Copy link

vercel bot commented Sep 23, 2024

@khanark is attempting to deploy a commit to the Learn Build Teach Team on Vercel.

A member of the Team first needs to authorize it.

@@ -11,7 +11,7 @@ interface DealDetailsProps {
}
export default function DealDetails({ deal }: DealDetailsProps) {
return (
<div className="text-white">
<div className="sticky top-0 pt-2 text-white">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unfortunately, we can't add this directly to the DealDeatils component because it is used on the individual deal page route as well. Could you look to move sticky to the parent container inside of the /deals/add route?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll also need to add items-start class to the containing div as well as a little buffer on the top using top-10
CleanShot 2024-09-23 at 11 53 38

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.

2 participants