-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Docs] Update WIP section in Sequence page #2100
Comments
Invoking controller methods
Personally, I am proposing to keep this simple for now and simply explain how to call We can always add more content or improve the first version later. For controller methods
For route handlers
Writing the response
The sequence action is called I this place, I would explain that LB works differently from Express. In Express, the handler is responsible for setting response status code, headers and writing the response body. In LoopBack, controller methods and route handlers return data describing the response and it's the responsibility of the Sequence to send that data back to the client. This design makes it easier to transform the response before it's sent. The sequence should call LB4 does not yet provide first-class support for streaming responses, see #2230. As a short-term workaround, controller methods are allowed to send the response directly, effectively bypassing Keeping your Sequences
"Try and use existing actions" - I think this is already covered by the existing documentation, e.g. the example at the top of the page (https://loopback.io/doc/en/lb4/Sequence.html#what-is-a-sequence) shows how to use existing actions, https://loopback.io/doc/en/lb4/Sequence.html#custom-sequences shows how to extend the default sequence. As far as I am concerned, this is good enough for now. But maybe we to be more explicit about this aspect, write a short paragraph explaining that sequences can leverage default actions and point to the examples elsewhere? "Implement your own version of built in actions" - I think this is already covered by https://loopback.io/doc/en/lb4/Sequence.html#custom-sequences. "Publish reusable actions to npm" - I feel this is about extension authoring, IMO such content should live under Extending LoopBack. Here in key concepts, I would simply add a link pointing to a new page in Extending LoopBack. However, such page does not exist yet. I am not sure if writing it is in the scope of this user story, maybe we should create a new task to review current documentation for people that want to build and publish a custom implementation of a sequence action, and ensure all important aspects of this scenario (story) are correctly documented. Thoughts? As I see the placeholders, they were created in early LB4 days where our documentation was minimal. Their purpose was to serve as reminders of what content we may want to write. Since those days, a lot of new content was added, some of the new content is already covering topics listed in the reminders. IMO, we should not treat these reminders as a fixed plan to follow, a list of placeholders to fill with content. Instead, we should use them as discussion starters, as a list of topics and scenarios to cover in our docs. |
Thank you for the detailed background/clarification @bajtos. I agree with your points and will follow through with your proposal for the rest of the doc updates. |
Description / Steps to reproduce / Feature proposal
Originated from the docs cleanup epic: #1908
Under Key Concepts > Sequence page, there are a few sections that are marked as "Work in Progress". We should have it updated.
Acceptance Criteria
From Sequence page, review and update accordingly for the following sections:
The text was updated successfully, but these errors were encountered: