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 the file usage table #9747

Merged

Conversation

emteknetnz
Copy link
Member

Copy link
Member

@Cheddam Cheddam left a comment

Choose a reason for hiding this comment

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

It feels like this could use some fleshing out - not having been across this API's development, I don't get a clear understanding of how I should be interacting with it from reading this doc.

  • Would it make more sense to break out each of the available extension points and fully describe its purpose, behaviour, and any potential pitfalls? Performance implications seem particular important - updateUsageDataObject() in looks like it operates on every single DataObject in the table, which could get heavy very easily. Some of the methods could probably benefit from multiple example implementations, too.
  • Are there any other sections of the documentation that could include links to this doc to make it more discoverable?
  • Please reformat to a max of 120 characters per line
  • An intro to this API needs to be included in the 4.7.0 / 4.7.0-beta1 changelog. In particular it'd be good to outline what change in behaviour developers will see from the Used On table when upgrading.

@emteknetnz emteknetnz force-pushed the pulls/4/usedontable-docs branch 3 times, most recently from 3cefb6b to 248f8c2 Compare November 2, 2020 23:14
@emteknetnz emteknetnz changed the base branch from 4 to 4.7 November 2, 2020 23:14
@emteknetnz
Copy link
Member Author

emteknetnz commented Nov 2, 2020

@Cheddam

  • I've added inline comments to the the extension hook examples to further elaborate what each of the extension hooks do
  • I've reformatted to 120 chars
  • I've added an intro in the beta changelog
  • Rebased and retargeted to 4.7

I don't know where else in the docs it would make sense to link to this. It will have its own section in https://docs.silverstripe.org/en/4/developer_guides/files/#files which seems like it's good enough?

docs/en/02_Developer_Guides/14_Files/07_File_Usage.md Outdated Show resolved Hide resolved
docs/en/02_Developer_Guides/14_Files/07_File_Usage.md Outdated Show resolved Hide resolved
docs/en/02_Developer_Guides/14_Files/07_File_Usage.md Outdated Show resolved Hide resolved
docs/en/02_Developer_Guides/14_Files/07_File_Usage.md Outdated Show resolved Hide resolved
docs/en/04_Changelogs/beta/4.7.0-beta1.md Outdated Show resolved Hide resolved
docs/en/04_Changelogs/beta/4.7.0-beta1.md Outdated Show resolved Hide resolved
docs/en/04_Changelogs/beta/4.7.0-beta1.md Show resolved Hide resolved
Co-authored-by: Bryn Whyman <bryn.whyman@silverstripe.com>
@emteknetnz
Copy link
Member Author

@brynwhyman have implemented your feedback and add you as a co-author to the commit message

@Cheddam
Copy link
Member

Cheddam commented Nov 3, 2020

@emteknetnz Two more minor things - the changelog item needs to be added to the table of contents at the top of the doc, and you should replicate this item in the (provisional) 4.7.0 stable changelog for consistency.

In terms of where else in the docs this could be linked from, a note about it in the relationships article might make sense, since some of the examples there use Files:
https://docs.silverstripe.org/en/4/developer_guides/model/relations/

@maxime-rainville maxime-rainville merged commit e5a55a9 into silverstripe:4.7 Nov 3, 2020
@maxime-rainville maxime-rainville deleted the pulls/4/usedontable-docs branch November 3, 2020 21:59
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.

4 participants