-
-
Notifications
You must be signed in to change notification settings - Fork 93
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 docs on how to customize the structure updater pattern #785
Conversation
85ee999
to
dffaa6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thet could you add a example for the registry entry for titleSelector and descriptionSelector
otherwise lgtm
dffaa6c
to
bddd40c
Compare
@agitator please re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
mockup/patterns/structure/README.rst
Outdated
|
||
If you need some more control, you can overload the pattern and provide your own. | ||
|
||
The pattern is registered in the RequireJS configuratio in ``mockup/mockup/js/config.js`` under the name ``mockup-patterns-structureupdater`` and under the path ``patterns/structure/pattern-structureupdater``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: configuration (missing an "n")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the config.js path is mockup/js/config.js, right? mockup is there twice. One can assume that you mean inside the repository.
mockup/patterns/structure/README.rst
Outdated
|
||
If you need some more control, you can overload the pattern and provide your own. | ||
|
||
The pattern is registered in the RequireJS configuratio in ``mockup/mockup/js/config.js`` under the name ``mockup-patterns-structureupdater`` and under the path ``patterns/structure/pattern-structureupdater``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos:
configuration
(misses the last n)- config.js path should have only one mockup in it, right? the first mockup would be the repository, but if one looks at this, already inside mockup, would think that there is two nested folders named mockup in mockup's repository (or at least that's what happened to me)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the inline feedback
cc7ac09
to
03c6c02
Compare
@gforcada done! plz re-review. |
@thet as for the text, it looks fine for me. Regarding where it is placed, I don't see any other rst but the ones at the top level, all docs have been so far kept bundled inside the JS themselves. Is there a good reason to keep this one outside? |
The reason I placed it within the structure pattern folder was, that wouldn't be a bad place if we hadn't already some kind of different structure and most importantly I wanted to get it done instead of thinking too long about the problem where to place it. I should probably transfer it to MarkDown and place it alongside DEVELOP.md and LEARN.md. |
@thet I wouldn't block the merge due to where to place the docs, but maybe it would be a good idea to create an issue for that and discuss it there. Probably with the @plone/documentation-team involved as well 👍 |
03c6c02
to
3887447
Compare
3887447
to
1b6e665
Compare
Here is some documentation on how to customize and overload the structure updater pattern.
It also applies on how to customize any pattern in general.
I've put it into mockup/mockup/patterns/structure - which doesn't follow our conventions but is probably a good place to put it to.
It's also written as .rst instead of MarkDown like the rest of mockups docs are written.
I used .rst because I know it better and I need some feedback anyways.
I'm not sure if this docs should live here or go to docs.plone.org - but I couldn't find an appropriate place there and I do not want to start a new chapter just to be able to put this documentation there....
any opinions or comments?