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

Web search #90

Merged
merged 20 commits into from Apr 12, 2020
Merged

Web search #90

merged 20 commits into from Apr 12, 2020

Conversation

felko
Copy link
Contributor

@felko felko commented Apr 11, 2020

This implements a search page where users can query the zettelkasten by title and by tags.

  • Search zettels by title
  • Zettel tags redirect to the search page where one can see all zettels with that tag (alternative to #88 )
  • Advanced search
    • Make a separate field for selecting tags explicitly
    • Filter by date Will integrate dates into the index later
    • Sorting (alphabetically, chronologically, ...) Useless without the date and more fields to sort by

I was planning on using Semantic UI modules for the interface of advanced search, which requires JavaScript content. We therefore must think about whether or not the search page should be accessible locally (or even offline) which would mean adding an npm dependency.

@srid srid added the enhancement label Apr 11, 2020
@srid
Copy link
Owner

@srid srid commented Apr 11, 2020

Just took a casual look. This is great!

I was planning on using Semantic UI modules for the interface of advanced search, which requires JavaScript content. We therefore must think about whether or not the search page should be accessible locally (or even offline) which would mean adding an npm dependency.

That should be fine, as long as the new dependencies are managed by Nix.

As for offline, that's not even supported right now (see src-bin/Main.hs which is pulling semantic UI css from CDN, as well as mathjax) - but we probably should (i.e., copy over semantic ui files using Rib.buildStaticFiles) - but that happen in a different PR.

@felko felko marked this pull request as ready for review Apr 12, 2020
@srid srid self-requested a review Apr 12, 2020
Copy link
Owner

@srid srid left a comment

I haven't looked this in detail yet, but added some comments for now.

src/Neuron/Zettelkasten/Route.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/Route.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten/View.hs Outdated Show resolved Hide resolved
src/Neuron/Zettelkasten.hs Outdated Show resolved Hide resolved
@srid
Copy link
Owner

@srid srid commented Apr 12, 2020

A couple of comments regarding the footer:

  • The search icon should be placed before the z-index tree icon (which remains at the end)
  • The icons are not aligned with equal gaps (unless editUrl is enabled). See screenshot

image

Here, the search icon should be at the center, with the z-index icon placed in the far right. If editUrl is enabled, all the four icons should be spaced equidistantly.

src/Neuron/Zettelkasten/View.hs Outdated Show resolved Hide resolved
@srid
Copy link
Owner

@srid srid commented Apr 12, 2020

Also, search doesn't work in the local version (neuron open). Maybe embedding the JSON in search.html is a solution ...

srid
Copy link
Owner

@srid srid commented on 8a2deaf Apr 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are not using those arguments, better to not pass them. i.e.,:

renderSearch store = do 
  ...

@felko felko requested a review from srid Apr 12, 2020
Especially when there are only three of them.
@srid srid merged commit c0d9b8a into srid:master Apr 12, 2020
2 checks passed
@felko felko deleted the web-search branch Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants