Hopefully if we can make something robust enough and standalone enough we can package it separately so that other users can digest it when developing their own Chrome Omnibox extensions.
Requirements:
Takes 1 string as an input (fully typed / pasted URL)
Every time the user enters a character, the tool is re-queried and an array of 'suggestions' is returned
Each suggestion contains a full URL (?)
Pattern matching is loose (suggest 'wiki' route if user types 'wik')
Suggestions should be filtered
If the user hits 'enter' the user is redirected
if the input is a full URL, no matching is performed
Pattern matching must be exact (cannot select 'wiki' route for 'wik')
Route matching is nested
there are base routes (search all of github)
sub routes if the user types 'my '
sub routes if the user types '@user'
sub routes if the user types 'repo/whatever'
one route if the user types 'whatever' (general search)
AJAX MIGHT be performed (in future release) to get better suggestions for next step in route
typing '@' will query a list of followed users
typing 'somename/' will query a list of the user/org's repos
tl;dr
Need a nested triggering system where I can execute logic inside callbacks after each step of the route. The routing system will be used both in loose mode (for suggestions) and exact mode (for when the user hits ENTER).
Ideas
Suggestions
Push new suggestion to array after going through each step
If a parent route matches, perhaps all sub-steps execute
If a parent route matches but only one sub-step starts to match, it executes
Go to URL
If a user moves through suggestions, the input can be changed to a full URL (current implementation)
If it's easier to continue providing suggestions while traversing, perhaps route terms can be completed, and we only build the full URL when you hit enter?
Hopefully if we can make something robust enough and standalone enough we can package it separately so that other users can digest it when developing their own Chrome Omnibox extensions.
Requirements:
tl;dr
Need a nested triggering system where I can execute logic inside callbacks after each step of the route. The routing system will be used both in loose mode (for suggestions) and exact mode (for when the user hits ENTER).
Ideas