Varkopat/enhancement/629 status gating for heroes - #681
Conversation
Codecov Report❌ Patch coverage is
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Great work! I went through the changes and everything looks to be working as expected within the issue's scope. I did notice an existing edge case with the static hero fallback. If Directus returns no published heroes, the view falls back to the static hero data hence bypasses the status gating. This isn't really part of the original scope, so I'll create a separate follow-up issue for it rather than blocking this one. Looks good to me, well done! |
|
One minor thing: I noticed altLogoold.png is also changed in this PR. I assume it probably got carried over from an earlier merge, but just wanted to check whether that change is intentional. This isn’t a blocker for me, since it doesn’t seem to affect the implementation here. Still, for future PRs it’s worth keeping an eye on unrelated file changes so the diff stays focused on the issue being worked on. |
Thank you! Just one question about the follow-up issue: Is it already possible to start working on it or is there a possibility of merge conflicts? I'm interested in continuing to work with Directus related issues. |
Yes, altLogoold.png got carried over from an earlier merge. It somehow has done so for a while when I create a new branch. I need to work on it to see what causes that. Tips are appreciated. I will keep an eye on unrelated file changes in future issues 👍 |
You can start working on it already. #682 Most of the changes would be in different files although there will probably be some overlap in heroApi.ts, since the follow-up needs to distinguish an actual Directus failure from a successful empty response, but most of those changes should be in different parts of the code. I'd recommend branching the follow-up from this branch rather than directly from dev. That should avoid most of the potential conflicts, and if this branch gets merged first, the follow-up branch can be easily rebased onto dev. |
📄 Pull Request Overview
Closes #629
🔧 Changes Made
heroes.statusas a Select/Dropdown field in Directus. The field uses a “Status” UI similar to the provided screenshot in the issue.✅ Checklist Before Submission
console.log()or other debugging statements are left.📝 Additional Information
Provide any additional context or information that reviewers may need to know:
The defense gallery now shows only heroes which status is defined as "published" in Directus:
Status field in Directus: