Skip to content

docs: update operator imports in remaining examples#6739

Merged
benlesh merged 1 commit intoReactiveX:masterfrom
jakovljevic-mladen:fix_remaining_operator_imports_in_examples
Jan 11, 2022
Merged

docs: update operator imports in remaining examples#6739
benlesh merged 1 commit intoReactiveX:masterfrom
jakovljevic-mladen:fix_remaining_operator_imports_in_examples

Conversation

@jakovljevic-mladen
Copy link
Copy Markdown
Member

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

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


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

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
Copy Markdown
Member Author

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.

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

Choose a reason for hiding this comment

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

same here.

Copy link
Copy Markdown
Member

@benlesh benlesh left a comment

Choose a reason for hiding this comment

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

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 Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x labels Jan 7, 2022
@benlesh benlesh merged commit 45abd01 into ReactiveX:master Jan 11, 2022
@jakovljevic-mladen jakovljevic-mladen deleted the fix_remaining_operator_imports_in_examples branch January 11, 2022 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants