-
Notifications
You must be signed in to change notification settings - Fork 4
feat: adding utilities for cards local generation & testing #34
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.
PR Compliance Checks
Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.
Watched Files
This pull request modifies specific files that require careful review by the maintainers.
Files Matched
- package.json
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.
Couple of small changes required for base nestjs testing practices. How does testing actually work with this new workflow, can you add it to the testing section of the Readme? π
@0-vortex Hmm, well it was meant to be a form of manual standalone testing to check the appearance not automated testing. Didn't have much luck getting jest to acknowledge the e2e test files in /test as well. |
Ok, other good folder ideas for the static output:
|
A fix for avoiding the automated testing failures is to return status code 0 on the base test command and implement our own testing command as a separate script - that way we could keep the testing boilerplate code inside the |
Yup added a separate command for running the generation file. |
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.
Managed to give this a spin locally and imagined making a user card version 2, the resulting SVG is matching the generated image and can be used to pixel perfect the design without very much trial and error, being very close to local development with a NextJS based frontend; because of the pros and cons of vercel/satori the workflow proposed in this PR is close to best of what we can get.
The paths provided by the svg can be inspected in devtools and provide x/y coordinates by default, making it easy to debug and prototype new cards:
Have a couple more minor changes to suggest to make this perfect IMHO:
Let me know if you find this reasonable β€οΈ
cc @brandonroberts think this PR is solving the blocker and making development bearable, what are your thoughts?
@0-vortex The reason I made |
future social cards could pose some unknown requirements for which we could only make assumptions now; don't think the way we split the code should affect the way we run the testing commands or rather, limit ourselves to optimising those via code only; an example here is we could keep it with whatever name as long as it's in |
@0-vortex Alright, no problem π |
I like the separate npm script command for usercards. We could make a static page with the sample usernames that fetch from the running backend also, but I think its good enough for now. |
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.
2 small changes are still needed, test command should get renamed too π
## [2.1.0-beta.1](v2.0.1...v2.1.0-beta.1) (2023-04-26) ### π Features * adding utilities for cards local generation & testing ([#34](#34)) ([c5a5fec](c5a5fec))
π This PR is included in version 2.1.0-beta.1 π The release is available on: Your semantic-release bot π¦π |
* feat: getuserdata private * fix: fix incorrect import * feat: refractor & add local scripts * feat: add local dev generation script * last touches * refractor: suggestions * docs: add documentation for local dev script * refractor: change output folder * update local dev user command name c5a5fec
## [2.1.0](v2.0.1...v2.1.0) (2023-05-09) ### π Bug Fixes * Overflowing language bar fix ([#38](#38)) ([3dc1a0a](3dc1a0a)) ### π Features * adding utilities for cards local generation & testing ([#34](#34)) ([c5a5fec](c5a5fec)) * Highlight Cards UI Generation (frontend-only) ([#36](#36)) ([138a847](138a847)) * highlights getting repo name & languages from pr's repo ([#41](#41)) ([1555a25](1555a25)) * higlight card upload & storage ([#39](#39)) ([b6abefa](b6abefa)) * UI adjustments ([#42](#42)) ([acbe81a](acbe81a))
π This PR is included in version 2.1.0 π The release is available on: Your semantic-release bot π¦π |
What type of PR is this? (check all applicable)
Description
npm run local-dev:usercards
to run the script and generate the images for local testing.Related Tickets & Documents
fixes #31 & #26
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?