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

Feature suggestion: include module names in search on package pages #133

Closed
jvoigtlaender opened this issue Nov 26, 2015 · 5 comments
Closed

Comments

@jvoigtlaender
Copy link
Contributor

When I'm on http://package.elm-lang.org/packages/elm-lang/core/3.0.0/ and start typing "rand.." into the search box, I would expect that the Random module link presents itself for me to select. But it doesn't. I think it would be better if it did. One could still debate whether it should just appear as a single entry, or with all subentries for types and values inside Random. (After all, "rand..." matches all things like Random.bool, Random.int, ...)

@mgold, I know you have been working on the search functionality here recently. What do you think about the above?

@mgold
Copy link
Contributor

mgold commented Nov 27, 2015

Interesting - this doesn't come up for many core modules because they define a function or type that's their name. It doesn't come up for many libraries because few have more than 3-4 modules.

But I think this is a reasonable thing to expect, and it shouldn't be too hard for me to add in the next few days to a week. I'll just have to make sure I don't duplicate module names.

Also I think it should only be the module name (plus anything in the module that matches itself, but those would already cause the module to be present).

@mgold
Copy link
Contributor

mgold commented Nov 28, 2015

This is a one line change and I'll get Evan's attention on Monday.

@jvoigtlaender
Copy link
Contributor Author

Concerning this, which I've thought a bit about now:

One could still debate whether it should just appear as a single entry, or with all subentries for types and values inside Random. (After all, "rand..." matches all things like Random.bool, Random.int, ...)

I'd actually want to see all the subentries of Random in that case. Otherwise, the UI experience seems to become inconsistent. Right now, when I have put something into the search box, I know that I don't have to click on the module links, because anything that is relevant for my query will appear as links a level deeper. This expectation is broken if for "rand..." I do get the Random link, but not the Random.bool, Random.int etc. sub-links.

And I'd even go a bit further. Let's say I have seen Color.black mentioned somewhere, and want to find it. So on the core package page, I start typing "color.black" into the search box. (There is no reason for me really to know that I shouldn't do that. That I should only type "black", not "color.black" as I have seen mentioned somewhere.) The current behavior is that I never get to see the actual link to Color.black. As long as I'm still typing "color", I only get to see links to the Color module and to the type Color.Color. And as soon as I'm typing the dot, I don't get to see any links anymore. With my suggested change (above) to the behavior, a link to Color.black would present itself very early during my typing of "col...".

@evancz
Copy link
Member

evancz commented Nov 28, 2015

Should work now. I think this was in the last version, but got dropped in the update.

@jvoigtlaender
Copy link
Contributor Author

Continued in #139. I think the behavior concerning subentries should be different. I implemented what I think it should be like over there.

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