Add admin bulk visibility actions for diagrams#1
Merged
Conversation
- Add MakePublic, MakeUnlisted, MakePrivate Backpex item actions - Add admin_bulk_update_visibility/2 function to Diagrams context - Register item actions in DiagramResource - Add comprehensive tests for bulk visibility updates - Add implementation documentation
Move 14 feature implementation documents from docs/ to docs/features/ to better organize documentation. Keeping DiagramForge.md (main project doc) and deployment-pipeline.md (DevOps doc) in the root docs/ directory.
The custom item actions (make_public, make_unlisted, make_private) were being blocked by the catch-all can?/3 clause that returns false. Added explicit permission checks for these actions.
Flash messages now automatically dismiss after 10 seconds, solving the issue where consecutive bulk visibility actions would show stale flash messages. The previous flash blocked new ones from appearing until manually closed. Changes: - Add AutoDismissFlash JavaScript hook that clears flash after timeout - Add auto_dismiss_flash_messages component in Admin.Layouts - Replace Backpex flash_messages with custom component in admin layout - Add comprehensive tests for bulk visibility actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New files:
lib/diagram_forge_web/admin/item_actions/make_public.exlib/diagram_forge_web/admin/item_actions/make_unlisted.exlib/diagram_forge_web/admin/item_actions/make_private.extest/diagram_forge/diagrams_admin_test.exs(7 tests)docs/features/admin-bulk-visibility.mdModified files:
lib/diagram_forge/diagrams.ex- Addedadmin_bulk_update_visibility/2lib/diagram_forge_web/admin/resources/diagram_resource.ex- Registered item actionsTest plan