Skip to content

Add code to allow defining orders in tutorial.json#1198

Open
dkniffin wants to merge 1 commit intojsdoc:mainfrom
dkniffin:tutorial-ordering
Open

Add code to allow defining orders in tutorial.json#1198
dkniffin wants to merge 1 commit intojsdoc:mainfrom
dkniffin:tutorial-ordering

Conversation

@dkniffin
Copy link
Copy Markdown

The docs imply that you can order the tutorials. That wasn't actually possible before. Now, you can specify a order attribute in the config.

Resolves #1028


I also took a stab at writing tests, but couldn't figure out how to test the order of an array in jasmine (that's what this project uses, right?), so I left it out of the PR. My thought for a test would be to change this file to this:

{
    "test2": {
        "title": "Test 2",
        "children": ["test3", "test6"],
        "order": 2
    },
    "test3": {
        "title": "Test 3",
        "children": {
            "test4": {"title": "Test 4"}
        },
        "order": 1
    }
}

Then, the test would go here, and look something like this:

        it('sorts tutorials by their order', function() {
            expect(resolver.root.children).toContainValuesInOrder([test3, test2]);
        });

@asnov
Copy link
Copy Markdown

asnov commented Jul 21, 2016

Hi guys,
I need this feature too. Could anybody merge this commit, please? Or something else should be done here?

@OpherV
Copy link
Copy Markdown

OpherV commented Dec 1, 2016

Thanks @dkniffin!
I'm also interested in this feature

What should be the name/location of the JSON file that configures ordering?

@dkniffin
Copy link
Copy Markdown
Author

dkniffin commented Dec 2, 2016

@OpherV Sorry, it's been a while since I've used this. I believe the file name doesn't matter. It just needs to be a json file in the right directory.

Also @hegemonic, any chance this can get merged soon?

@bbusschots
Copy link
Copy Markdown

It would be really great if this PR could be accepted so this much-needed feature finally arrives.

It's nuts that the order of tutorials appears to be random!

@gavinlynch
Copy link
Copy Markdown

Anyone....?

@roger-o3h
Copy link
Copy Markdown

Please....?

@dkniffin
Copy link
Copy Markdown
Author

dkniffin commented Sep 4, 2020

@hegemonic I created this PR a long time ago now (and I actually no longer use jsdoc at all). Is jsdoc abandoned or what? Can this please be merged?

@roger-o3h
Copy link
Copy Markdown

Hate to say it but this is feeling like a bit of a ghost town: https://github.com/jsdoc/jsdoc/pulls?q=is%3Apr+is%3Aclosed
A ghost town with a bot sheriff. 👻🤖

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.

Tutorials aren't sorted despite being documented as having that capability

6 participants