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

Add search input and keyboard shortcuts #31

Merged
merged 2 commits into from
Apr 2, 2015
Merged

Conversation

pcj
Copy link
Contributor

@pcj pcj commented Apr 2, 2015

  • Replaces the fixed-menu <div class="title item"> with <div class="search item"> that contains a search input item. The html.eco file statically initializes the placeholder to the document.title. This is a little sneaky as it is not obvious that this element is a search input, but maintains the appearance of the existing UI without sacrificing real estate in the fixed menu bar; this could be changed to a dedicated separate item in the menu if desired.
  • Adds an event listener to $('search') input element to initialize the search functionality the first time a user focuses the search input.
  • Search input source initialization will $.getJSON('src/metadata.json'), which is generated by the gulp build-docs command.
  • Adds keyboard shortcuts s (focus the search input) and ? (show a small modal describing the shortcuts) and adds dependency on jquery.hotkeys.js.

jessy1092 and others added 2 commits April 2, 2015 10:02
Modify rating to initialRating during initialization
* Load json from src/metadata.json.
* Add keyboard shortcuts.
@jlukic
Copy link
Member

jlukic commented Apr 2, 2015

Checkin

@jlukic
Copy link
Member

jlukic commented Apr 2, 2015

Changing the location a little bit but keeping it the same.

@jlukic jlukic merged commit f0a23bb into Semantic-Org:next Apr 2, 2015
jlukic added a commit that referenced this pull request Apr 2, 2015
@jlukic
Copy link
Member

jlukic commented Apr 2, 2015

Forgot to tag some commits bb8bdc7 726a6c4 2df8bd8

jlukic added a commit that referenced this pull request Apr 2, 2015
@jlukic
Copy link
Member

jlukic commented Apr 6, 2015

Keyboard shortcuts appear to be borked, related to zuriby/jquery.hotkeys#45

@pcj
Copy link
Contributor Author

pcj commented Apr 6, 2015

I am seeing this only on the welcome page (index.html); not able to reproduce with any other page. Are you seeing same?

@jlukic
Copy link
Member

jlukic commented Apr 6, 2015

Yeah. I also notice swapping to on from bind breaks it, which is the new jq syntax

@jlukic
Copy link
Member

jlukic commented Apr 6, 2015

I'm slightly redoing the look & feel of docs for 2.0 to use a fixed sidebar so will need to move around search as well. Still figuring out how the top fixed bar will interact. Probably will only show on scroll up.
img

@pcj
Copy link
Contributor Author

pcj commented Apr 6, 2015

I'm working on this... From results so far I think there is a bug in
jquery.hotkeys...

it may be that it seems to operate under the assumption that it is the only
one using jquery special events. If other scripts are using it, it may
break.

Will have to look into if there is something about the semantic docs ui
welcome page that registers something under special events before hotkeys.

On Mon, Apr 6, 2015 at 10:45 AM, Jack Lukic [email protected]
wrote:

I'm slightly redoing the look & feel of docs for 2.0 to use a fixed
sidebar so will need to move around search as well
[image: img]
https://camo.githubusercontent.com/68cad7858bc9cd9f5c84b18b863bf9702f8fc95b/68747470733a2f2f646c2e64726f70626f7875736572636f6e74656e742e636f6d2f752f323635373030372f6e65772d646f63732e6a7067


Reply to this email directly or view it on GitHub
#31 (comment)
.

@jlukic
Copy link
Member

jlukic commented Apr 6, 2015

I think using a different library is probably ideal. That ones pretty old

Maybe https://github.com/ccampbell/mousetrap

@pcj
Copy link
Contributor Author

pcj commented Apr 6, 2015

That's probably a good call. I was just looking at Mousetrap myself. You want me to make the change?

Also, if you do to a fixed left sidebar layout, you may not need the search function at all. But it does show off the feature nicely.

@jlukic
Copy link
Member

jlukic commented Apr 6, 2015

Is it ok if I ping you in a couple days. I want to get all the moving parts of the design out of the way before asking for a PR.

@pcj
Copy link
Contributor Author

pcj commented Apr 6, 2015

yep

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.

3 participants