-
Notifications
You must be signed in to change notification settings - Fork 3k
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: add operator flag to operator functions #6563
docs: add operator flag to operator functions #6563
Conversation
@@ -56,6 +56,10 @@ label.raised, .api-header label { | |||
&.impure-pipe { | |||
background-color: $brightred; | |||
} | |||
|
|||
&.operator { | |||
background-color: $brightred; |
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 reused the same color as in impure-pipe
class - there are no impure pipes in RxJS 🙂
@@ -26,6 +26,7 @@ <h1>{$ doc.name $}</h1> | |||
{% if doc.experimental !== undefined %}<label class="api-status-label experimental">experimental</label>{% endif %} | |||
{% if doc.stable !== undefined %}<label class="api-status-label stable">stable</label>{% endif %} | |||
{% if doc.pipeOptions.pure === 'false' %}<label class="api-status-label impure-pipe">impure</label>{% endif %} |
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 I will remove all Angular references like this one - there are so many of them that are so specific to Angular that they could be removed quite safely.
This LGTM. I was sort of waiting for @niklas-wortmann's review though, since he owns the docs app. |
LGTM, this is a great idea and I like it a lot! |
Description:
This PR adds a label to all functions that are considered as operator functions. That is, any function that is exported from
src/internal/operators
will have this label.The processor that was created to determine if a document
isOperator
determines this by checking if a document hasoriginalModule
and iforiginalModule
starts with'internal/operators'
. This means that any exported function that is not operator that may in future come from'internal/operators'
will be marked as an operator - for now, there are no such functions. But if some util (non-operator) function gets exported in future from'internal/operators'
, it should be moved to another place so that it doesn't get marked as operator.This is a handy addition, especially after RxJS v7.2.0 since operators are exported from
'rxjs'
and many operators are now displayed on two pages (for example: http://rxjs.dev/api/operators/map and http://rxjs.dev/api/index/function/map).Some examples how this looks like (please notice URL):
zip
creation function, exported from'rxjs'
:Deprecated
zip
operator, exported from'rxjs/operators'
:Note: almost all (if not all) processors come with a
.spec.js
file. I didn't add one with this PR as so many tests actually fail when tests are run. For this reason, I don't think those tests are really essential. If they ever become essential, I will write some.Related issue (if exists):
Somewhat #6544.