Skip to content
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 operator imports in remaining examples #6739

Conversation

jakovljevic-mladen
Copy link
Member

@jakovljevic-mladen jakovljevic-mladen commented Jan 5, 2022

Description:
Fix remaining examples from .md files from docs_app/content/ folder.

Related issue (if exists):
#6650 and #6678

@@ -34,7 +34,8 @@ Instead of creating a [ConnectableObservable](/api/index/class/ConnectableObserv

<!-- prettier-ignore -->
```ts
import { ConnectableObservable, Subject, timer } from 'rxjs';
Copy link
Member

@benlesh benlesh Jan 7, 2022

Choose a reason for hiding this comment

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

I'm not sure why this was changed? Was there some sort of automated fix?

Copy link
Member Author

@jakovljevic-mladen jakovljevic-mladen Jan 7, 2022

Choose a reason for hiding this comment

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

I don't use any tool, all I use is WebStorm and this handful shortcut which works in this line as well, which is amazing, since this is not actual code, but a comment.

But, why I changed this line? Because I did the same set of changes in examples below this one - as I said in #6678, it was much easier for me to keep track of all objects I need. What I did with every changed example is to run the docs script, wait to re-render the example in browser and then I opened StackBlitz to verify that everything is working just fine. In the end, when SB opened and was ready, I checked every imported object to see if it is used - those that were not used were never highlighted in the code below - this is how ordering objects by the time they were used helped me.

In this particular example, it was just my OCD to make things consistent through entire file, nothing else. I don't ever expect anyone else to keep doing the same consistency changes as I did, sorry about that.

@@ -44,7 +45,8 @@ tick$.connect();

<!-- prettier-ignore -->
```ts
import { connectable, Subject, timer } from 'rxjs';
import { connectable, timer, Subject } from 'rxjs';
Copy link
Member

@benlesh benlesh Jan 7, 2022

Choose a reason for hiding this comment

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

same here.

benlesh
benlesh approved these changes Jan 7, 2022
Copy link
Member

@benlesh benlesh left a comment

In general, nothing to block the PR on, but I am curious why some of the changes are just reordering imports that were otherwise fine. Is there a tool you're using?

@benlesh benlesh added 7.x 8.x labels Jan 7, 2022
@benlesh benlesh merged commit 45abd01 into ReactiveX:master Jan 11, 2022
5 checks passed
@jakovljevic-mladen jakovljevic-mladen deleted the fix_remaining_operator_imports_in_examples branch Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x 8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants