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

[feat] Styling Status Filter #73

Merged
merged 15 commits into from
Nov 18, 2024
Merged

Conversation

nehaahussain
Copy link
Contributor

@nehaahussain nehaahussain commented Nov 15, 2024

What's new in this PR

Description

  • created a component for the style of the opened status filter
  • status filter is a single-select filter
  • apply button changes color when the user selects a status to filter by
  • added font details to texts.ts

Screenshots

Screenshot 2024-11-15 at 7 23 22 PM

How to review

  • press status filter
  • review the following folders/files:
    StatusDropdown folder, styles folder, schema, Filter folder (index.tsx), FilterBar folder,

Next steps

  • use GSS for technology filter

Relevant links

Online sources

Related PRs

CC: @itsliterallymonique

@nehaahussain nehaahussain linked an issue Nov 15, 2024 that may be closed by this pull request
@nehaahussain nehaahussain marked this pull request as ready for review November 16, 2024 03:31
Copy link
Collaborator

@itsliterallymonique itsliterallymonique left a comment

Choose a reason for hiding this comment

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

Made comments on the changes you should make. Styling looks really good. I just suggested these changes to make it easier for us later on if the designer decides to adjust margins / makes changes to the design.

background: ${COLORS.white};
width: 10.5rem;
border-radius: 0.5rem;
padding-bottom: 0.5rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete padding-bottom

border-radius: 0.5rem;
padding-bottom: 0.5rem;
`;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Make a new styled div. This is so we can house all the content in one place and add the padding around it (so that if Josh ever changes it again it's easy to change the padding directly from the figma). Use the styled div to wrap around the content (check my comments in index.tsx)

export const FilterContentDiv = styled.div`
  display: flex;
  flex-direction: column;
  padding: 0.625rem 1.25rem 0.9rem 1.25rem;
  align-content: space-between;
`;

`;

export const CheckboxStyles = styled.input`
cursor: pointer;
Copy link
Collaborator

Choose a reason for hiding this comment

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

add margin-left: 0rem; for some reason the button is not directly aligned with the apply button which we want

align-items: center;
cursor: ${({ isActive }) => (isActive ? 'pointer' : 'not-allowed')};
border: none;
margin: 1.4rem auto 0.5rem auto;
Copy link
Collaborator

Choose a reason for hiding this comment

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

auto not 0.5rem (we don't need this margin since we have a margin for the div wrapped around all the content

Copy link
Collaborator

Choose a reason for hiding this comment

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

It should look like margin: 1.4rem auto auto auto;

background: ${COLORS.white};
border: none;
border-radius: 6.25rem;
display: flex;
Copy link
Collaborator

Choose a reason for hiding this comment

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

move display: flex; to the top so it looks more standard

display: flex;
align-items: center;
gap: 0.5rem;
margin-left: 1rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete

align-items: center;
gap: 0.5rem;
margin-left: 1rem;
padding-top: 1rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete

align-items: center;
gap: 0.5rem;
margin-bottom: -1.5rem;
margin-left: 1rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove

const isApplyButtonActive = selectedStatus.length > 0;

return (
<FilterDropdownStyles>
Copy link
Collaborator

Choose a reason for hiding this comment

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

below this, add to wrap around all the filter content

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should look like this:
Screenshot 2024-11-16 at 3 37 53 PM

</div>
<ApplyButtonStyles isActive={isApplyButtonActive}>
<ApplyFiltersText>APPLY</ApplyFiltersText>
</ApplyButtonStyles>
Copy link
Collaborator

Choose a reason for hiding this comment

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

below this, add

Copy link
Collaborator

@itsliterallymonique itsliterallymonique left a comment

Choose a reason for hiding this comment

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

great job you can squash and merge

@nehaahussain nehaahussain merged commit 012f1a2 into main Nov 18, 2024
2 checks passed
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.

[feat] Styling Status Filter
2 participants