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

feat(categories): Can set Item, Trait and Character Categories to not visible. #599

Merged
merged 31 commits into from
Jun 4, 2023

Conversation

SpeedyD
Copy link
Contributor

@SpeedyD SpeedyD commented May 19, 2023

Not done yet- the first commit is purely to allow the setting.

Will add the actual hiding itself in a bit, but decided to PR ahead of time for potential comments. :)

OFFICIALLY CALLING IT DONE!

Full list of features: (As per commit 81001b4)

  • Admin can now set Character Categories to Non-Visible.
  • Hidden Character Categories are marked as such in the admin list of character categories.
  • Admin can now set Item Categories to Non-Visible.
  • Hidden Item Categories are marked as such in the admin list of item categories.
  • Admin can now set Trait Categories to Non-Visible.
  • Hidden Trait Categories are marked as such in the admin list of trait categories.
  • Character Categories do not show up in the dropdown choices of the masterlist, myolist or sublists for non-staff.
  • Item Categories do not show up in the dropdown choices of the masterlist, myolist or sublists for non-staff.
  • Trait Categories do not show up in the dropdown choices outside of the admin area.
  • Character Categories are hidden in the Encyclopedia for non-staff.
  • Character Categories in the Encyclopedia are marked as invisible for staff, when hidden.
  • Character Categories that are hidden do not show up in the Your Characters category dropdown of New/Edit Trades for non-staff.
  • Items with an Item category now link to the category in the Encyclopedia.
  • Items with a hidden Item Category no longer show up in the Encyclopedia for non-staff.
  • Item Categories are hidden in the Encyclopedia for non-staff.
  • Item Categories in the Encyclopedia are marked as invisible for staff, when hidden.
  • Individual item pages with a hidden Item Category in the Encyclopedia now 404 for non-staff.
  • Item Categories that are hidden do not show up in the Add-ons category dropdown of Design Updates for non-staff.
  • Item Categories that are hidden do not show up in the Add-ons category dropdown of New Submissions/Claims for non-staff.
  • Item Categories that are hidden do not show up in the Your Inventory category dropdown of New/Edit Trades for non-staff.
  • Items with a hidden Item Category are not visible in the shop for non-staff. (Thanks to @AW0005!)
  • Items with a hidden Item Category now appear as part of the 'Miscellaneous' category in the User (Home) Inventory, User (Public) Inventory and Character Inventory for non-staff.
  • Item Categories in the shops are now marked as invisible for staff, when hidden.
  • Species in the Encyclopedia are marked as invisible for staff, when hidden.
  • Subtypes in the Encyclopedia are marked as invisible for staff, when hidden.
  • Trait Categories are hidden in the Encyclopedia for non-staff.
  • Trait Categories in the Encyclopedia are marked as invisible for staff, when hidden.
  • Trait Categories are hidden in the Species Visual Trait Index.

- Trait Categories on trait dropdown menus (for non-staff)
- Trait Categories in the Encyclopedia (for non-staff)
- Character Categories in the Encyclopedia (for non-staff)
- Item Categories in the Encyclopedia (for non-staff)
- Trait Categories in the Species Visual Trait Index
@SpeedyD
Copy link
Contributor Author

SpeedyD commented May 19, 2023

Anyone have suggestions of where else to hide things?? Please let me know!!

@AW0005
Copy link
Contributor

AW0005 commented May 19, 2023

Some places I spotted that might be good to hide on:

  • app/Http/Controllers/ShopController.php :: Maybe for ItemCategories in getShop? I could see adding a new category worth of items to a shop and not wanting it to display until the category has been unhidden.
  • app/Http/Controllers/WorldController.php :: ItemCategories in getItem, maybe 404 there as well if the ItemCategories is intended to be hidden, and FeatureCategories in getSpeciesFeatures for the visual trait index if that's being used
  • app/Http/Controllers/Characters/DesignController.php :: getAddons, ItemCategories are passed to be able to filter the inventory picker so probably want to hide from there
  • app/Http/Controllers/Users/SubmissionController.php :: getNewSubmission and getNewClaim, Similarly ItemCategories is being passed through to the inventory picker
  • app/Http/Controllers/Users/TradeController.php :: Same deal, being passed through to the inventory picker in two of these calls, but also CharacterCategories are used here for filtering the character picker as well

@SpeedyD
Copy link
Contributor Author

SpeedyD commented May 20, 2023

Note to self: redo models to be like Species/Subtype because the way it's set up now is hiding nothing XD

@SpeedyD
Copy link
Contributor Author

SpeedyD commented May 22, 2023

  • app/Http/Controllers/WorldController.php :: ItemCategories in getItem, maybe 404 there as well if the ItemCategories is intended to be hidden, and FeatureCategories in getSpeciesFeatures for the visual trait index if that's being used

Implemented these- Separate item pages will now 404 if the category they're in is hidden (ADD Not for staff anymore), and they will simply not appear on the index. For staff, they do appear on the index with a visiblity marker.

As for Feature Categories being hidden on the Visual Trait index; already had that! :)

@SpeedyD
Copy link
Contributor Author

SpeedyD commented May 28, 2023

  • app/Http/Controllers/Characters/DesignController.php :: getAddons, ItemCategories are passed to be able to filter the inventory picker so probably want to hide from there

  • app/Http/Controllers/Users/SubmissionController.php :: getNewSubmission and getNewClaim, Similarly ItemCategories is being passed through to the inventory picker

  • app/Http/Controllers/Users/TradeController.php :: Same deal, being passed through to the inventory picker in two of these calls, but also CharacterCategories are used here for filtering the character picker as well

Got these three done, at least.

@SpeedyD
Copy link
Contributor Author

SpeedyD commented May 28, 2023

  • app/Http/Controllers/ShopController.php :: Maybe for ItemCategories in getShop? I could see adding a new category worth of items to a shop and not wanting it to display until the category has been unhidden.

This one is a bit more difficult. Removing the Category... basically just puts the items into 'Miscellaneous' instead.

As per my latest push, it does do that now, including in User and Character Inventories.

@SpeedyD SpeedyD marked this pull request as ready for review May 28, 2023 13:42
@SpeedyD
Copy link
Contributor Author

SpeedyD commented May 28, 2023

Alright, screw it. Opening it up as ready. I don't know what else to do, frankly, and I want this looked over properly...

@itinerare, @AW0005, @preimpression, @Draginraptor - Please review when you are able and willing. 🙇

@itinerare itinerare merged commit fd42cbb into corowne:develop Jun 4, 2023
@itinerare itinerare added enhancement New feature or request reviewed Pull requests that have received community review and are pending merge labels Jun 4, 2023
@SpeedyD SpeedyD deleted the feature/hiding-categories branch June 4, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request reviewed Pull requests that have received community review and are pending merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants