-
Notifications
You must be signed in to change notification settings - Fork 59
Docs: Add Custom Code Guide #520
Conversation
... to your service after building it. It clarifies the process of merging branches, modifying files, and more.
...clear Understanding Code Code page that explains the philosophy and goes into the modifications that might happen to non-base files.
...tom code to your service page.
...g the link on the new guide.
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.
Maybe instead of saying this- we can say that custom code can be added to all files or such.
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.
Amplication can update the files in the base folder in each build, but also may update generated code in other files
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.
They may not be "preserved" as the generated code can be updated there. So I would say something like-
Files outside the base
folder are intended for your custom code.
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.
I think we should be more clear here and avoid using the word merging (as we merge nothing but suggest a PR that it can be merged).
We should say that Amplication will always respect the custom code that was created by the user and never overwrite it
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 user will get updates in the base file only in case there are relevant changes.
Not sure it's important to mention that the base files (and actually all the generated code) is regenerated every time
docs/how-to/add-custom-code.md
Outdated
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.
Again- all custom code is preserved...
docs/how-to/add-custom-code.md
Outdated
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.
Using the known git mechanism
docs/how-to/add-custom-code.md
Outdated
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.
Let's emphasize that the conflict resolution should take place on 'amplication' branch, and then- merge the result to the main branch
docs/how-to/add-custom-code.md
Outdated
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.
Let's remove it. I don't think it adds value here
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.
Adding to this comment-
Not sure I understand why we have two separate pages for the custom code. It seems like there is redundancy between the files and the content repeats itself.
I can understand the need to have one page to explain the concepts of the generated code, and custom code, and the other to show an example of updating custom code or such but then- we need to make sure each page has its own "uniqueness" and contribute different things to the subject.
WDYT?
...n/docs into docs/git-sync-updates
...mplementing Paz's feedback, making these pages much easier to read, and flow better.
Hey @PazYanoverr, I implemented your latest feedback. Also, the additional feedback you gave me on the call really helped. I implemented that too. The pages have their own uniqueness, with one focusing on implementation and the other on explanation, as suggested.
My one recommendation is adding a Conclusion section to the end of the implementation guide. Now that the user has this custom code full name retrieval method, what can they do with that? Can they use it in the app, or somewhere else in their code? What are the repercussions? Can we link them to a GitHub repo for a more sophisticated example?
@dericksozo this one looks good to me - please resolve the conflict and I will approve and merge it
Uh oh!
There was an error while loading. Please reload this page.
(docs): Adding a new guide around adding custom code / business logic to your service after building it. It clarifies the process of merging branches, modifying files, and more.
This PR takes care of #517 and #518.