Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Docs] How to find out the resource config required when customizing models#10371

Merged
pamil merged 5 commits into
Sylius:1.4from
4c0n:feature/add-more-info-to-model-customization-docs
Jun 12, 2019
Merged

[Docs] How to find out the resource config required when customizing models#10371
pamil merged 5 commits into
Sylius:1.4from
4c0n:feature/add-more-info-to-model-customization-docs

Conversation

@4c0n
Copy link
Copy Markdown
Contributor

@4c0n 4c0n commented May 9, 2019

Q A
Branch? 1.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
License MIT

Added information/instructions on how to find out what the correct resource configuration should be in _sylius.yaml.

@4c0n 4c0n requested a review from a team as a code owner May 9, 2019 11:22
@Zales0123 Zales0123 added the Documentation Documentation related issues and PRs - requests, fixes, proposals. label May 9, 2019
@4c0n 4c0n changed the title Feature/add more info to model customization docs [Docs] How to find out the resource config required when customizing models May 9, 2019
Copy link
Copy Markdown
Contributor

@lchrusciel lchrusciel left a comment

Choose a reason for hiding this comment

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

I have never used this debug config command, nice one :D Good to know ;)

Comment thread docs/customization/model.rst Outdated
---------------------------- -------------------------------------------


In some cases however, you will see an error:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would vote to add something like this to separate header.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was absolutely thinking the same thing, but what to call this?
It seems very related to "extended" models (https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/inheritance-mapping.html#class-table-inheritance ?), but how can we explain or easily find out if that is the case for the model that the developer wants to customize?

Another option could be to add a "Troubleshooting" section for example, would you be okay with that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Troubleshooting seems reasonable for me, but this is a @CoderMaggie call :)

Comment thread docs/customization/model.rst Outdated
Comment thread docs/customization/model.rst
Copy link
Copy Markdown
Member

@CoderMaggie CoderMaggie left a comment

Choose a reason for hiding this comment

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

Hello Youri 👋

This tip is very valuable, although it's description is lengthy, don't you think? 😉

I suggest you to refactor this and:

  1. add a new doc (Tips & Tricks) to the Customization Guide section docs/customization/tips_and_tricks.rst;
  2. In this doc add a section How to get Sylius Resource configuration from the container?
  3. And there give the tips you are giving here
  4. Here in the models doc you can then refer to that part from a .. tip:: :)

How do you feel about it?

@4c0n
Copy link
Copy Markdown
Contributor Author

4c0n commented May 16, 2019

Hello Youri

This tip is very valuable, although it's description is lengthy, don't you think?

I suggest you to refactor this and:

  1. add a new doc (Tips & Tricks) to the Customization Guide section docs/customization/tips_and_tricks.rst;
  2. In this doc add a section How to get Sylius Resource configuration from the container?
  3. And there give the tips you are giving here
  4. Here in the models doc you can then refer to that part from a .. tip:: :)

How do you feel about it?

Hi Magdalena,

Thank you very much for your feedback. I really appreciate it. :D
It is quite lengthy indeed, I totally agree with your suggestions and will process them.

I feel at some point in time we should somehow edit the original model customization guide and introduce a step 1 that allows the reader to determine what kind of model they are trying to customize and immediately point them to the right section (so having separate instructions for each case, like we have a section for regular models and a section for translated models now).
However we currently don't have a good way to do that, so we can always revisit it when we have that figured out.

@4c0n
Copy link
Copy Markdown
Contributor Author

4c0n commented May 23, 2019

@CoderMaggie Can you review this again please? Thanks in advance!

@Zales0123 Zales0123 requested a review from CoderMaggie June 10, 2019 09:16
@pamil pamil changed the base branch from 1.3 to 1.4 June 12, 2019 14:02
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jun 12, 2019

@4c0n thanks for your patience! Merging this PR as soon as the build passes 🎉

@pamil pamil merged commit 06b753e into Sylius:1.4 Jun 12, 2019
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Jun 12, 2019

Thanks, Youri! 🎉

@4c0n
Copy link
Copy Markdown
Contributor Author

4c0n commented Jun 12, 2019

At your service Kamil 👍

@4c0n 4c0n deleted the feature/add-more-info-to-model-customization-docs branch June 12, 2019 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation related issues and PRs - requests, fixes, proposals.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants