-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: version switcher #11
base: develop
Are you sure you want to change the base?
Conversation
Ready to review |
73282b5
to
351443b
Compare
and improve a few other things.
ec58c6a
to
81df2a2
Compare
1. Use `npm run serve` or `gulp serve` command to ascertain realtime. | ||
3. Api-Example tab, Auto-Complete and Resize functions are written in the `static/scripts/tui-doc.js` file. | ||
1. Use `npm run serve` or `gulp serve` command to wacth for changes and live reload browser. | ||
3. API-Example tab, Auto-Complete and Resize functions are written in the `static/scripts/tui-doc.js` file. |
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 greatly appreciate for your correction 🤗 .
(I'm not good at english 😅..)
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.
😊
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.
There's still a typo in watch
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.
Thanks 😘
… going to work on that PR tonight.
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.
That was outdated ;)
|
I think this approach is better that #9 Do you agree? In this case I would implement the ignore option 😊 |
I really like the idea of the Plus having the possibility to ignore But it would be more useful to accepts semver syntax and ignore version levels like this "versionSwitcher": {
"versions": [">=2.x"]
} This would result in having all versions up from Or "versionSwitcher": {
"versions": [">=2.x"],
"excludeLevel": "patch"
} This would result in having all versions up from |
Awesome~ |
Guess I’m done with that Anyone wants to review? 😗 |
3a6dd99
to
4126577
Compare
4126577
to
6bf30fd
Compare
ad62543
to
4c7bb09
Compare
Hej @minkyu-yi, any idea when to land this approximately? Sorry, I don’t wanna put any pressure on you but I’m so excited to use that template for the Yeoman docs 😗 |
Yeah, I hope to release no later than next week. Sorry for the delay. |
👌 Thanks for the info. |
Hej @mischah Thanks for the pr. We could access a specific method, class, etc from url without the iframe-version-switcher. But we can not access from url with the iframe-version-switcher. This problem arises from iframe. So I propose the version-switcher form( This form rendered in <body>
<?js if(versionSwitcher) { ?>
<header>
<form class="form-inline version-switcher">
<div class="form-group">
<label for="selectVersion">Version:</label>
<select id="selectVersion" class="form-control"></select>
</div>
</form>
</header>
<?js } ?>
...left-navigation,
...main
...footer
</body> Or any ideas to solve this problem? |
No problem. Me neither. Just updated the initial PR description. So. Yes. Native browser deeplinking and bookmarkability is another thing we lose with the iFrame approach. Must say that I don’t want to trash the iFrame approach because of its pros. Possible solutionWith f46954c I made it possible to link to older versions. I could try to extend this functionality to:
Is this something you would accept as solution? |
Yeah~!😀 In this problem, with your solutions, using the iframe is not a problem. We can sync parent url and iframe url with using your solutions. So we can share a specific url with others for seeing the same page within version-switcher. Is it right? I think it would be a really useful feature. I appreciate your help. |
Yeah. Thats how it should work. Can’t promise anything for now, though. But I would like to give it a try. Back to the example you posted. URL without version switcher:
URL with version switcher enabled:
or similar Im not quite sure how to implement that. I possibly could use the HTML5 history API. |
I think most use cases of jsdoc-template are on modern browsers. So the version-switcher doesn't need to support old browsers.🙂 |
@mischah Thank you :) |
Thanks for pinging me. I picked up a newborn and the mother from hospital the day before yesterday plus I need to take care of my 2 year old son. Hope that things are getting more relaxed next week. But I can't promise anything by now. Sorry 🙈 |
Oh, I see. Thank you! |
Hej, it’s been almost a year since I started working on this 🙈 Just wanna say thank you for keeping this open. |
@mischah bump ;) |
Hej, here’s the implementation of option 3 of the version switcher as proposed in #5.
Must say that I prefer it over the implementation of option 1 in #9
Pros:
publish.js
Cons:
<title>
Element of the page holding that iFrameCloses #5