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: refactoring hideSidebar configuration. #1396

Closed
wants to merge 22 commits into from

Conversation

Koooooo-7
Copy link
Member

Refactor hideSidebar that removing the tpl of sidebar (if hideSidebar : true).
Checking the hideSidebar when having options on sidebar.

Summary

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Repo settings
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

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

  • Yes
  • No

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

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

@vercel
Copy link

vercel bot commented Oct 13, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/3kbn0qg3v
✅ Preview: https://docsify-preview-git-refactor-holdsidebar.docsify-core.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 13, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2ac291e:

Sandbox Source
docsify-template Configuration

Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

This is a much better approach than the current one.

cc @sy-records , this will fix #1392 as well.

Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

Can you write tests for this if possible ?

@Koooooo-7
Copy link
Member Author

Can you write tests for this if possible ?

yup, I will check the test tutorial and try to get a new test. 😅

@sy-records sy-records linked an issue Oct 14, 2020 that may be closed by this pull request
1 task
Copy link
Member Author

@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.

Add test and we may add more tests of configurations here.
The CI issues cuz the test site includes search plugin to cause the error.

src/plugins/search/search.js Outdated Show resolved Hide resolved
anikethsaha
anikethsaha previously approved these changes Oct 14, 2020
@sy-records
Copy link
Member

    TypeError: Cannot read property 'insertBefore' of null

      163 | 
      164 |   function before(target, el) {
    > 165 |     return target.insertBefore(el, target.children[0]);
          |                   ^
      166 |   }
      167 | 
      168 |   function on(el, type, handler) {

Error due to docsify-plugin-carbon plugin, @waruqi Can you fix it in your plugin?

* fix: Can't search homepage content

* fix: when pathNamespaces does not exist

* add test

* update test to fix windows ci
@Koooooo-7
Copy link
Member Author

@waruqi thx ur input ! IMHO, literally, it is not ur duty to make the plugin which is based on sidebar to suit the no sidebar case, it seems awkward.
@sy-records As I mentioned, it is not the carbon plugin caused some err, could u provide any information about it ?

@Koooooo-7 Koooooo-7 requested review from anikethsaha and removed request for anikethsaha October 15, 2020 07:04
@Koooooo-7
Copy link
Member Author

cc @anikethsaha @sy-records I fixed the CI issue, review it again plz.

Comment on lines -137 to -140
document.querySelector('section.content').style.right = 'unset';
document.querySelector('section.content').style.left = 'unset';
document.querySelector('section.content').style.position = 'relative';
document.querySelector('section.content').style.width = '100%';
Copy link
Member

Choose a reason for hiding this comment

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

@anikethsaha Should we keep the style?

develop branch

image

now

image

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can just keep this configurations without adjusting much styles right now (dont let render code including much styles), and if there has much users proposal to make it that we can refine it again.
WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep them and not change them in the z versions.

@sy-records

This comment has been minimized.

@Koooooo-7
Copy link
Member Author

Please check the console for some errors

image

Plz Checking the exception again and make sure how it is reproducible and what it is blame for.FYI. If you just found something wrong/exception without catching the point, it would be useless.

@sy-records
Copy link
Member

Add hideSidebar: true, to index.html to reproduce.

@Koooooo-7
Copy link
Member Author

@sy-records sorry, I can't make it reproducible, could u please do me a favor that checking about it.

@sy-records
Copy link
Member

sy-records commented Oct 16, 2020

Well, ignore it. I can't reproduce it either.

@Koooooo-7
Copy link
Member Author

Well, ignore it.

what does the ignore mean? if there were an issue, we should figure it out to make our site changes and test reliable.

@jhildenbiddle
Copy link
Member

jhildenbiddle commented Mar 20, 2022

@Koooooo-7 --

Is this PR still worth considering or should we close it? I admit to not reviewing it due to the age, but I'm happy to if you'd like me to.

@Koooooo-7
Copy link
Member Author

@Koooooo-7 --

Is this PR still worth considering or should we close it? I admit to not reviewing it due to the age, but I'm happy to if you'd like me to.

It seems outdate, I'd like to close it for now,

@Koooooo-7 Koooooo-7 closed this Mar 21, 2022
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.

Hidden sidebar causing other plugins issues
5 participants