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

refactor: move some functions and module-level state into classes as private methods and properties to start to encapsulate Docsify #2136

Closed

Conversation

trusktr
Copy link
Member

@trusktr trusktr commented Jul 17, 2023

Summary

Also some small tweaks:

  • move initGlobalAPI out of Docsify.js to start to encapsulate Docsify
  • move ajax to utils folder
  • fix some type definitions and improve content in some JSDoc comments
  • use concise class field syntax in some spots
  • consolidate duplicate docsify-ignore comment removal code

Related issues

This handles a task in

as well as works towards

Continues from PR

What kind of change does this PR introduce?

Code style update
Refactor

For any code change,

  • Related documentation has been updated if needed
  • Related tests have been updated or tests have been added

Does this PR introduce a breaking change? (check one)

No

If yes, please describe the impact and migration path for existing applications:

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

@vercel
Copy link

vercel bot commented Jul 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 31, 2023 6:00am

…private methods and properties to start to encapsulate Docsify

Also some small tweaks:

- move initGlobalAPI out of Docsify.js to start to encapsulate Docsify
- move ajax to utils folder
- fix some type definitions and improve content in some JSDoc comments
- use concise class field syntax
- consolidate duplicate docsify-ignore comment removal code

This handles a task in [Simplify and modernize Docsify](#2104), as well as works towards [Encapsulating Docsify](#2135).
@trusktr trusktr force-pushed the move-private-functions-properties-into-classes branch from 2e5787f to 9f8c3c9 Compare July 17, 2023 04:23
@trusktr trusktr mentioned this pull request Jul 17, 2023
17 tasks
@trusktr trusktr force-pushed the move-private-functions-properties-into-classes branch from d7bbb50 to 9f8c3c9 Compare July 17, 2023 05:56
@trusktr trusktr mentioned this pull request Jul 17, 2023
6 tasks
@trusktr trusktr requested a review from a team July 17, 2023 05:58
@sy-records sy-records requested review from a team and removed request for a team July 17, 2023 05:59
#enableScrollEvent = true;
#coverHeight = 0;

#scrollTo(el, offset = 0) {
Copy link
Member Author

Choose a reason for hiding this comment

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

logic was not changed, only moved.


/**
* @template {!Constructor} T
* @param {T} Base - The class to extend
*/
export function Fetch(Base) {
let last;
return class Fetch extends Base {
#loadNested(path, qs, file, next, vm, first) {
Copy link
Member Author

Choose a reason for hiding this comment

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

logic was not changed, only moved.

Base automatically changed from fix-vue-in-vercel-deployments to develop July 18, 2023 10:33
Copy link
Member

@Koooooo-7 Koooooo-7 left a comment

Choose a reason for hiding this comment

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

should we change all the _private stuff to #private into ES6? otherwise, it seems messy here with both format.

@Koooooo-7
Copy link
Member

Closed since no changes detect (weird).
image

@Koooooo-7 Koooooo-7 closed this Aug 31, 2023
@sy-records sy-records deleted the move-private-functions-properties-into-classes branch August 31, 2023 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants