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

Various fixes and improvements #84

Merged
merged 11 commits into from
Mar 5, 2024
Merged

Various fixes and improvements #84

merged 11 commits into from
Mar 5, 2024

Conversation

mcaskill
Copy link
Collaborator

@mcaskill mcaskill commented Jan 30, 2024

Admin

  • Fix and improve base path in AssetsBuilder.

    The AssetsBuilder now accepts a base path from its constructor.

    Replaced relative base path assumption (dirname(__DIR__, 7)) with dedicated base path, either:

    1. Explicit base path (see constructor parameter), or
    2. Implicit base path (the current working directory).

    By default, the base path is explicitly set to the AppConfig's base path.

    This ensures relative asset paths are loaded according a more reliable base path.

  • Ensure master object exists in HierarchicalOjectProperty.

  • Remove default constructor descriptions from AssetsBuilder and SelectizeRenderer.

CMS

  • Ensure object is hierarchical in HierarchicalSectionTableWidget.
  • Fix missing master filter for menu items in SectionInterface admin metadata.
  • Clean-up SectionInterface admin metadata.
    • Decoupled common list actions, object actions, and orders.

Object

  • Improve Hierarchical mixin.

    • Added method hasMasterObject().
    • Added methods loadHierarchy() and loadSiblings().
  • Fix missing orphaned descendants in HierarchicalCollection.

    When collection is displayed on one page, orphaned descendants should be displayed.

    Previously, they were only displayed in pagination was enabled.

  • Fix bad hierarchy repair in HierarchicalCollection.

    • Set master to null instead of 0.
  • Filter argument of HierarchicalTrait::setMaster().

    • Fix edge case where hasMaster() compares 0 to null.
    • Reset masterObject when master changes to avoid conflicts.

Image

  • Fix best fit in ImageMagick Resize effect.

If argument is falsy, set `master` to `null` to avoid false-positives.

Changed:
- Fixed edge case where `hasMaster()` compares `0` to `null`.
- Reset `masterObject` when `master` changes to avoid conflicts.
…tion`

When collection is displayed on one page, orphaned descendants should be displayed.

Previously, they were only displayed in pagination was enabled.
Changed:
- Added method `hasMasterObject()`.
- Added methods `loadHierarchy()` and `loadSiblings()`.
- Fixed type-hints related to `ModelInterface` and `HierarchicalInterface`.
Decoupled common list actions, object actions, and orders.
They described what a constructor is in general and not what the classes' constructors do.
@mcaskill mcaskill force-pushed the feature/various-fixes branch from a6a380c to ca77b4d Compare March 5, 2024 16:22
mcaskill added 2 commits March 5, 2024 11:29
The `AssetsBuilder` now accepts a base path from its constructor.

Replaced relative base path assumption (`dirname(__DIR__, 7)`) with either:

1. Explicit base path (see constructor parameter), or
2. Implicit base path (the current working directory).

By default, the base path is explicitly set to the `AppConfig`'s base path.

This ensures relative asset paths are loaded according a more reliable base path.
Only apply `^` operator (minimum values of size) if both width and height are supplied, otherwise the image will be cropped to a square.
@mcaskill mcaskill force-pushed the feature/various-fixes branch from ca77b4d to f2cdc77 Compare March 5, 2024 16:29
@mcaskill mcaskill merged commit afbbff5 into main Mar 5, 2024
36 checks passed
@mcaskill mcaskill deleted the feature/various-fixes branch March 5, 2024 16:34
@charcoal-butler
Copy link
Contributor

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant