-
Notifications
You must be signed in to change notification settings - Fork 62
feat(operators): add support for vendor specific examples in operator docs #210
base: master
Are you sure you want to change the base?
Conversation
@btroncone - This is looks great. This hopefully brings in more contributions since it is easier to contribute for framework specific implementations. |
@btroncone This looks good 👍 Few Questions:
|
@sumitarora @ladyleet - Continuing from our decision from the meeting, We should have one JSBin account which holds all examples. The same goes with any another sites we use stackblitz, etc., |
@ashwin-sureshkumar @sumitarora well......... jsbin will not let me create an account without a github login. i think this will be a hinderance for people who are looking to help create examples/contribute so i'm not sure how we are going to keep this consistent as the # of contributors grows? thoughts? |
@ladyleet Good point, having to contribute under an official account would make it more difficult for new contributors. I'm not sure how to solve this problem if we want to have embeds on the site unless we want to vet code first in PR's then post to an official bin. Seems like a clunky process though. @sumitarora I feel like this could grow organically. If you use an operator (or group of operators) to do something cool while working with one of these frameworks or libraries this just offers a space to share. I'm not sure we have to decide up front which deserve examples over others. |
} | ||
|
||
get sourceUrl() { | ||
return `${this.baseSourceUrl}/${this.operator.name}.ts`; |
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.
from a performance point of view it would be better to declare pipes for these transformations, to prevent unnecessary recalculation. Don't know if this will make a huge difference but it won't hurt really
Codecov Report
@@ Coverage Diff @@
## master #210 +/- ##
=========================================
Coverage ? 77.14%
=========================================
Files ? 15
Lines ? 175
Branches ? 7
=========================================
Hits ? 135
Misses ? 40
Partials ? 0
Continue to review full report at Codecov.
|
@sumitarora @ladyleet - I think we can merge this PR in. @btroncone - please fix conflicts and rebase. |
This shouldn't be merged yet but I wanted to open a PR for discussion regarding how we want to handle larger, library or framework dependent examples. This is something that has been requested a ton (ex. how would I used x in Angular or React), and @ladyleet and I had a brief discussion the other day about potential ways to fit this into our docs.
This PR adds sub routes to each operator and if the data includes these examples, adds tabs to the operator interface to switch between general information or select examples for a specific library. For example, if no examples exist you will see the same UI as today:
If examples exist, say adding the below prop to the operator data:
You will now get a tabbed interface with the appropriate examples aggregated under each:
Each tab contains examples using Stackblitz for the embed:
Let me know what you all think, thanks!