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

If there's only one sitemap, open it in Basic UI #38

Closed
kubawolanin opened this issue Oct 19, 2017 · 6 comments
Closed

If there's only one sitemap, open it in Basic UI #38

kubawolanin opened this issue Oct 19, 2017 · 6 comments

Comments

@kubawolanin
Copy link
Collaborator

Currently if we open Basic UI from within VSCode (Ctrl + Alt + O) and sitemap file is not active, the list of available sitemaps displays in the side view.
It would be good to display the default sitemap or the only one if length of /rest/sitemaps is equal to 1.

@Confectrician
Copy link
Collaborator

Yeah there has been a long silence in this issue i know^^
But i had one thing that got me stuck here.

It would be good to display the default sitemap or the only one if length of /rest/sitemaps is equal to 1.

My current response would be:

[
    {
        name: "MyAwesomeSitemap",
        label: "Awesome is awesome is awesome is awe...",
        ...
    },
    {
        name: "_default",
        label: "Home",
        ...
    }
]

So the length would be 2 and i would expect it to be loaded anyway.
(Currently this is the case anyways, since i have configured it this way in PaperUI. But thats not the topic.)

So conclusion for me would be:

length == 1 

OR

length == 2 AND any sitemaps name == "_default"

wdyt?

@ThomDietrich
Copy link
Member

Heyho!
my head is filled with unrelated thoughts and I can't clearly remember.
A long there was a discussion I was involved in, in which Kai and I and a few others discussed the meaning of the _default sitemap and wether or not it should be shown in Basic UI or removed or whatever.

Maybe it's worth to check the esh or distro repo for a related issue.

@kaikreuzer anything you want to add?

@Confectrician
Copy link
Collaborator

But does that change anything for the showing option?

Currently it is there and i would say that in this case any other sitemap should count as the only one when there is no additional custom sitemap.

@ThomDietrich
Copy link
Member

It would still be interesting to link this issue to the other one so that your additional check can be removed at a later point.

Besides that I agree, checking the possibility of a _default sitemap in #104 will not create regression issues at a later point. I like the PR.

@Confectrician
Copy link
Collaborator

It would still be interesting to link this issue to the other one so that your additional check can be removed at a later point.

Totally agree, lets wait if Kai can remember something about it. :)

@kaikreuzer
Copy link
Member

I cannot remember much, actually. I am wondering, if we should remove the _default sitemap rather sooner than later - not sure if anybody uses it at all... (wemight need to do a poll?)

With the work that is going on in eclipse-archived/smarthome#5337, I would hope that we will some time have a better dynamically created sitemap than the current _default...

TL;DR: I am fully ok with ignoring _default right now as an option in VSCode and display any other, if there is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants