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 defaultCropType param #4357

Merged
merged 2 commits into from
Oct 29, 2024
Merged

add defaultCropType param #4357

merged 2 commits into from
Oct 29, 2024

Conversation

dblatcher
Copy link
Contributor

What does this change?

Adds a defaultCropType param to kahuna's search, image and crop pages and validates and stores it in the same way as the existing cropType param.

The defaultCropType is used to set what type of crop to initially set the on the crop window. If the param is not set, this will default to 'landscape', (being defined as defaultCrop) as currently

How should a reviewer test this change?

run locally, open:
https://media.local.dev-gutools.co.uk/search?nonFree=true&defaultCropType=freeform
choose an image, click the 'crop' button
the crop UI should have "freeform" selected instead of "landscape"

How can success be measured?

The purpose is to allow application that use a Grid window to specify the "preferred" crop type, without preventing user selecting other crops.

In particular, the request is for Gallery Articles in composer - when adding images, they should default to freeform (which will start as a full frame crop), but users should be able to select other, existing crops if desired.

Who should look at this?

Tested? Documented?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment
  • relevant documentation added or amended (if needed)

@dblatcher dblatcher requested review from a team as code owners October 28, 2024 17:59
Copy link
Member

@andrew-nowak andrew-nowak left a comment

Choose a reason for hiding this comment

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

tested locally, works nicely, great work!

@prout-bot
Copy link

Seen on media-api (merged by @dblatcher 8 minutes and 41 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on auth, thrall, kahuna (merged by @dblatcher 8 minutes and 46 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on cropper, usage (merged by @dblatcher 8 minutes and 56 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on collections, leases (merged by @dblatcher 8 minutes and 59 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on image-loader (merged by @dblatcher 9 minutes and 6 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on metadata-editor (merged by @dblatcher 9 minutes and 14 seconds ago) Please check your changes!

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

Successfully merging this pull request may close these issues.

3 participants