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

DOC Document upgrading intervention/image #547

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jul 10, 2024


Manipulating animated images takes longer, and results in a larger filesize.

Because of this, the [`ThumbnailGenerator`](api:SilverStripe\AssetAdmin\Model\ThumbnailGenerator) will provide still images as thumbnails for animated gifs by default. You can change that for a given instance of `ThumbnailGenerator` by passing `true` to the [`setAllowsAnimation()`](api:SilverStripe\AssetAdmin\Model\ThumbnailGenerator::setAllowsAnimation()) method. For example, to allow animated thumbnails for `UploadField`:
Copy link
Member

Choose a reason for hiding this comment

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

This also applies to all other PRs to changelogs - we're essentially duplicating docs on doc.silverstripe.org. We should just link to those docs instead of duplicating them in the changelog.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not at all uncommon for us to do this - we often give the most pertinent information directly in the changelog, even if it's also documented elsewhere.

This also applies to all other PRs to changelogs

I assume you want some amount of this removed, can you please indicate how much so I know how much I want to push back on it? :p

Copy link
Member

@emteknetnz emteknetnz Jul 23, 2024

Choose a reason for hiding this comment

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

It's not at all uncommon for us to do this - we often give the most pertinent information directly in the changelog, even if it's also documented elsewhere.

Yeah we do ... though just looking at this PR I actually have no idea why we've been doing this. We're quick to call out duplicate documentation in all other scenarios and say "You should just link to the original source" ... I'm not sure why the changelog should be treated any differently.

I assume you want some amount of this removed, can you please indicate how much so I know how much I want to push back on it? :p

Probably everything not in the first section intervention/image has been upgraded from v2 to v3 {#intervention-image} - I'd keep that and say that imagick is now the default if it's available and link to the docs

Most of the rest is duplication of "how to configure it", which is basically straight duplication

I'd also remove the "New API" bit, it just seems unnecessary. Very few people are going to be interested in calling the PHP methods directly, the configuration is much more relevant. If they really are interested in calling PHP methods directly then there's typehinting available anyway.


Manipulating animated images takes longer, and results in a larger filesize.

Because of this, the [`ThumbnailGenerator`](api:SilverStripe\AssetAdmin\Model\ThumbnailGenerator) will provide still images as thumbnails for animated gifs by default. You can change that for a given instance of `ThumbnailGenerator` by passing `true` to the [`setAllowsAnimation()`](api:SilverStripe\AssetAdmin\Model\ThumbnailGenerator::setAllowsAnimation()) method. For example, to allow animated thumbnails for `UploadField`:
Copy link
Member

@emteknetnz emteknetnz Jul 23, 2024

Choose a reason for hiding this comment

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

It's not at all uncommon for us to do this - we often give the most pertinent information directly in the changelog, even if it's also documented elsewhere.

Yeah we do ... though just looking at this PR I actually have no idea why we've been doing this. We're quick to call out duplicate documentation in all other scenarios and say "You should just link to the original source" ... I'm not sure why the changelog should be treated any differently.

I assume you want some amount of this removed, can you please indicate how much so I know how much I want to push back on it? :p

Probably everything not in the first section intervention/image has been upgraded from v2 to v3 {#intervention-image} - I'd keep that and say that imagick is now the default if it's available and link to the docs

Most of the rest is duplication of "how to configure it", which is basically straight duplication

I'd also remove the "New API" bit, it just seems unnecessary. Very few people are going to be interested in calling the PHP methods directly, the configuration is much more relevant. If they really are interested in calling PHP methods directly then there's typehinting available anyway.

@GuySartorelli
Copy link
Member Author

I'm not sure why the changelog should be treated any differently.

The changelog is the one thing developers will look at when evaluating what changes they need to make, and it serves double duty as an upgrade guide. Giving all of the most important information in the changelog does two things:

  1. Reduces the number of extra pages developers need to look at to get the most relevant information
  2. Increases the chance that developers will actually see it - because lets face it a lot of devs will just not click on the links, but are fairly likely to copy/paste the code examples when we put them right in front of them.

I like the precedent that the important information is included in the changelog even if that same information is provided in other sections of the docs. I see the changelog as "here's all the most important information, including the most relevant info you need for upgrading", whereas the rest of the docs is for future reference or searching for specific information, outside of the context of releases.

@GuySartorelli
Copy link
Member Author

I'm not keen to change that precedent now, especially when we don't have a team lead.

@GuySartorelli
Copy link
Member Author

We've also got a while 'til this gets released, and if it's anything like CMS 5 we'll spend a fair amount of time going back over the changelog to decide what stays in there, so we can revisit this precedent then, if we haven't already revisited it for a minor release in the meantime (again, when we have a team lead preferably)

@emteknetnz emteknetnz merged commit bbacccf into silverstripe:6 Jul 23, 2024
3 checks passed
@emteknetnz emteknetnz deleted the pulls/6/intervention-3 branch July 23, 2024 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants