-
Notifications
You must be signed in to change notification settings - Fork 1
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: add initiatives page #107
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The page content is not padded equally from the left and right side of the screen. This can probably be fixed by applying flex spacing styles on the container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Project Card skeleton doesn't match the Project Cards in layout, being wider and using different margins and corner radii. It doesn't cause a significant layout shift because the height is the same, but it would still be a less noticable transition when typing in searches if the positions of the elements inside matched.
This is the main reason I had all the skeleton components inside the ProjectCard. It did require checking loading state in a lot of places but it allowed me to match the style exactly without hassle and duplicating css. I think you are still correct in asking me to change that, but IMO we should approach the cards differently. If we have a more generic card component with well defined styles that we populate with slots, we can reuse it for both the project card and the project skeleton card without copy-pasting CSS and still only check loading state in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed a lot of components using pixel margins, paddings and sizes and I think we should try to avoid that going forward and use EM and REM instead. https://www.w3schools.com/cssref/css_units.php
There's a few places where I have already done this for this PR and I can submit them either here on a separate branch, whichever you prefer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes seem to break the project carousel on the landing page in the mobile view, it's missing the gaps between the cards.
Signed-off-by: pecirep <[email protected]>
use generic ContentCard as a template for ProjectCard and CardSkeleton Signed-off-by: pecirep <[email protected]>
… sizes Signed-off-by: pecirep <[email protected]>
Signed-off-by: pecirep <[email protected]>
use relative positioning instead of absolute and paint background of text instead of calculating svg box size, resulting in more consistent padding and reduced maximum width Signed-off-by: pecirep <[email protected]>
396c030
to
278a94e
Compare
setHasMore(result.length >= pageSize); | ||
} catch (error) { | ||
errorMessage({ message: 'Error refetching projects. Please check your connection and try again.' }); | ||
console.error('Error refetching projects:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this with logger.error
const projects = response.projects?.data.map(mapToBasicProject) ?? []; | ||
return projects; | ||
} catch (err) { | ||
console.info(err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this with logger.error()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to also fix the linting prpoblems, so the lint and build pass
Todos:
MobileFilterDrawer
, used for the initiatives page and the news pageProjectFilter.tsx
To check:
Closes #56