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

Add missing job filters #645

Merged
merged 6 commits into from
Dec 5, 2024
Merged

Add missing job filters #645

merged 6 commits into from
Dec 5, 2024

Conversation

annavik
Copy link
Member

@annavik annavik commented Dec 3, 2024

Note: needs rebase before merge! Base in not main.

Fixes #633 ! Also, I added some filter links from the session detail view, to make it possible to use the new filter source_image_single. I would like rework all bubble links at some point, to make it more clear what is going on here (not sure how many users understand what clicking these bubbles means), but for now I follow the same UI pattern as rest of the app.

Screenshots

Screenshot 2024-12-03 at 17 42 01 Screenshot 2024-12-03 at 17 33 10

@annavik annavik requested a review from mihow December 3, 2024 16:46
Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for ami-dev ready!

Name Link
🔨 Latest commit ccc8b1f
🔍 Latest deploy log https://app.netlify.com/sites/ami-dev/deploys/6750f8654103210008d8df57
😎 Deploy Preview https://deploy-preview-645--ami-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72
Accessibility: 89
Best Practices: 92
SEO: 100
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Base automatically changed from feature/verified-by-filter to main December 4, 2024 06:02
@mihow mihow force-pushed the feature/add-missing-job-filters branch from 5082f05 to ccc8b1f Compare December 5, 2024 00:48
Copy link
Collaborator

@mihow mihow left a comment

Choose a reason for hiding this comment

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

It works! It's great being able to link to jobs from the session detail / single capture. Thank you for that addition

@@ -14,13 +14,13 @@ export const EmptyState = () => {
: STRING.MESSAGE_NO_RESULTS
)}
</span>
{activeFilters.length && (
{activeFilters.length ? (
Copy link
Collaborator

Choose a reason for hiding this comment

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

@annavik I had to decide which of these changes to keep in the merge. Will you confirm that I chose the right one?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that looks right, thank you! Since activeFilters.length is a number, not a boolean, the later solution is better. Before we actually had a 0 mistakenly rendered, instead of nothing in the case of no filters.

If you want to go down the React rabbit hole further here is a blog post explaining this little thing: https://www.codemzy.com/blog/react-render-0-conditional

Copy link
Member Author

Choose a reason for hiding this comment

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

If you see a 0 out of context in any web app, it's probably because of this, it's a common mistake which I sometimes still do myself!! Another solution could be to cast the number to boolean !!activeFilters.length, but I personally think the ternary makes code a bit more readable in this case.

@mihow
Copy link
Collaborator

mihow commented Dec 5, 2024

@annavik I rebased main into this branch and the extra commits are now gone. It's actually a nice way to step through your changes! everything is working, so I am hoping I got it right, but will you double check?

@mihow mihow merged commit 3cc615f into main Dec 5, 2024
6 checks passed
@mihow mihow deleted the feature/add-missing-job-filters branch December 5, 2024 00:54
@annavik
Copy link
Member Author

annavik commented Dec 5, 2024

@annavik I rebased main into this branch and the extra commits are now gone. It's actually a nice way to step through your changes! everything is working, so I am hoping I got it right, but will you double check?

Thanks a lot for doing the rebase, looking good! You are right about the commits, that great. Even though we squashed them into to main, it's nice to keep the list clean for the PR history 👌

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.

Add missing backend filters for jobs
2 participants