-
Notifications
You must be signed in to change notification settings - Fork 9
Group modules by package in the sidebar #34
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
Conversation
klntsky
commented
Jul 6, 2020


|
Known issues:
To consider:
|
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.
very cool work, a feature I've been really looking forward to. thx!!
src/Docs/Search/App/Sidebar.purs
Outdated
| ] | ||
| [ HH.text " GROUP BY PACKAGE" ] | ||
|
|
||
| , if mode == GroupByPackage |
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.
Could we maybe extract the HH.ul_ as it appears in both branches of the if .. then .. else?
src/Docs/Search/App/Sidebar.purs
Outdated
| ] | ||
|
|
||
| if status == Expanded | ||
| then [ HH.text packageName |
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.
Maybe the same here, HH.text packageName is not part of the conditions...
src/Docs/Search/App/Sidebar.purs
Outdated
|
|
||
| -- Some optics: | ||
|
|
||
| _expansions :: forall a b rest. (a -> b) -> { expansions :: a | rest } -> { expansions :: b | rest } |
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.
extra space, or is that on purpose?.. don't know..
| @@ -0,0 +1,5 @@ | |||
| module Docs.Search.Types where | |||
|
|
|||
| type ModuleName = String | |||
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.
Maybe we could consider using newtypes here..
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'll do it in a separate PR. The best set of types here would be:
newtype ModuleName = ModuleName String
newtype PackageName = PackageName String
data PackageInfo = Package PackageName | Builtin | LocalPackage | UnknownPackage…nloads." This reverts commit 47506e8.
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 left a small request for more docs, but this looks amazing otherwise, great great work! 👏
|
Oh and also, we should preserve the state of the checkbox between page loads. |
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.
💯 👏