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

Relation Manager Customisation Improvements #4444

Merged
merged 35 commits into from
Mar 27, 2020
Merged

Relation Manager Customisation Improvements #4444

merged 35 commits into from
Mar 27, 2020

Conversation

danharrin
Copy link
Contributor

@danharrin danharrin commented Jul 10, 2019

This change allows for easy customisation of the relation manager titles and toolbar buttons.

For buttons - define your custom strings directly in the standard toolbarButtons syntax...

toolbarButtons:
    create: acme.blog::lang.subcategory.CreateButtonText
    delete: # omit the string to fall back to the default button text

...and the old syntax still works...

toolbarButtons: create|delete

For titles - define different strings for each mode (form, list or pivot)...

title:
    form: acme.blog::lang.subcategory.FormTitle
    list: acme.blog::lang.subcategory.ListTitle

This feature provides developer convenience, for example in this situation where I have a relation manager that is used to assign user permissions to a project:
Before
Screenshot 2019-07-10 at 09 28 22
After
Screenshot 2019-07-10 at 09 32 51

This PR contains no breaking changes.

@bennothommo
Copy link
Contributor

@danharrin I noticed in the changes that you've cleared out a fair few blank lines between lines 886 and 1000 of modules/backend/behaviors/RelationController.php. Whilst some of those could be removed to appease the code quality tests, some of them were probably being used for spacing. Would you be able to reinstate those, and fix the issues reported here: https://travis-ci.org/octobercms/october/jobs/556694232#L790

@danharrin
Copy link
Contributor Author

Hi @bennothommo, seems that VS Code played up and went mental with the new lines - my bad for not checking. Fixed the newline issues brought up by Travis CI, however some other errors have popped up now that look seemingly unrelated to this PR, mind having a look through them?

@bennothommo
Copy link
Contributor

@danharrin The code quality checks basically are limited to checking complete files - we can't limit it to specifically the lines of code that you have modified, so it's possible that it will bring up issues in parts of the code that have been there for while.

Given that it is only one minor issue - this empty line here needs to be removed - would you mind just quickly removing that for us and then we'll get cracking with the testing?

@danharrin
Copy link
Contributor Author

All done @bennothommo 👍

@bennothommo
Copy link
Contributor

Cheers @danharrin. Just note this won't be out until we start development on build 458, as 457 is in feature freeze now.

@danharrin
Copy link
Contributor Author

No worries @bennothommo :)

@danharrin
Copy link
Contributor Author

All whitespace has been removed @LukeTowers

@LukeTowers LukeTowers removed this from the v1.0.458 milestone Jul 22, 2019
@danharrin
Copy link
Contributor Author

All done @LukeTowers.

Co-Authored-By: Ben Thomson <ben@abweb.com.au>
@danharrin
Copy link
Contributor Author

Those changes should be complete @LukeTowers 👍

Copy link
Contributor

@LukeTowers LukeTowers left a comment

Choose a reason for hiding this comment

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

LGTM! Waiting on @bennothommo to review again.

@LukeTowers
Copy link
Contributor

@danharrin is there a PR to the docs documenting the new functionality?

@danharrin
Copy link
Contributor Author

Not yet, is that something that needs doing before this can be merged? We could just prepare something before it's released into a version.

@LukeTowers
Copy link
Contributor

@danharrin yup, needs to be ready to go before it gets merged otherwise it'll never get done. Speaking from experience here 😂

Copy link
Contributor

@bennothommo bennothommo left a comment

Choose a reason for hiding this comment

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

Sorry @danharrin, just a couple more :)

modules/backend/behaviors/RelationController.php Outdated Show resolved Hide resolved
modules/backend/behaviors/RelationController.php Outdated Show resolved Hide resolved
modules/backend/behaviors/RelationController.php Outdated Show resolved Hide resolved
modules/backend/behaviors/RelationController.php Outdated Show resolved Hide resolved
Dan Harrin and others added 6 commits March 27, 2020 07:35
Co-Authored-By: Ben Thomson <ben@abweb.com.au>
….htm

Co-Authored-By: Ben Thomson <ben@abweb.com.au>
….htm

Co-Authored-By: Ben Thomson <ben@abweb.com.au>
Co-Authored-By: Ben Thomson <ben@abweb.com.au>
Co-Authored-By: Ben Thomson <ben@abweb.com.au>
Co-Authored-By: Ben Thomson <ben@abweb.com.au>
@danharrin
Copy link
Contributor Author

All done @bennothommo.

@LukeTowers, I've done the docs change, see octobercms/docs#444.

@LukeTowers LukeTowers modified the milestones: Pending Features, v1.0.466 Mar 27, 2020
@LukeTowers LukeTowers merged commit cd86c62 into octobercms:develop Mar 27, 2020
LukeTowers pushed a commit to octobercms/docs that referenced this pull request Mar 27, 2020
@danharrin danharrin deleted the patch-1 branch March 27, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants