-
Notifications
You must be signed in to change notification settings - Fork 1
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
Query search development #6
Comments
For future development, I plan to do what I listed in ReadMe's todo. For improved search, I wonder if there's some query language that could be easily included to do exactly this. I did a quick search in npm registry, but I'm not sure what keyword I should use. I'm not sure yet how I could implement I could quickly include datatables multi-filter which adds search fields to all columns. My personal use case when I started the plugin was to have a date range picker to quickly see history based on a date range (ex: 1 week). I created the following feature/date-range-picker branch which I will update with master shortly. |
Yes, I've seen your ReadME, but I only ask if you plan to continue the dev and when ? When do you think to implement Query search ? I've read the Norvell source code. If I know the Trumpai code, he uses Regex. To answer to your question posted 8 month ago at https://addons.mozilla.org/en-US/firefox/addon/norwell/reviews/, to see source code simply download the extension and unzip it. As Trumpai says, this code is already Open Source. If you want reuse portions of his code, you must ask him to place it under MIT licence. There is no dependencies in the Trumpai plugin. It's cool, because I think it's lightweight. Maybe it's not necessary to search in npm registry If I understand the Norwell plugin, it pushes only the results who matches the regex.
For the date, if I understand the Norwell plugin, he uses the javascript Date Object. Each raw is associated to a Date. It displays only raw with Maybe (it's not sure) in one month I'll could try to help you. But I'm not really sure to have any time. There is not emergency, actually we have Firefox ESR for legacy plugins ;-), or Waterfox (but I don't know if it is very secure). |
For query search I think something like const result = [];
const regexAdd = "/^.+history.+$/" // Or "/^.+history google.+$/" if in the search string there is /^".+"$/ or /^'.+'$/
const regexMinus = "/^+google.+$/" // (deduce from search terms « history -google ». null if there isn't $/^-\S$/ in the search string.
const dateMin = new Date('2016-12-17T03:24:00'); // retrieve from UI
const dateMax = new Date('2017-12-17T03:24:00'); // retrieve from UI
allHistory.forEach(function(item){
const date = retrieveDate(item);
if (date >= dateMin && date <= dateMax && isMatch(regexAdd) && ! isMatch(regexMinus)){
result.push[item];
}
}) I don't know if it's possible to do something like that, or exactly like that. But there is the idea in this algorithm ;-). Obviously, it could be cool to could have an infinite number of regex… i.e. in the search bar have several « -term1 », « -term2 », « "term 3" », « "term 4" »… |
I try to write a pull request ;-) |
I like the idea. Maybe we could have a I also plan to add some unit tests to the project just to make additions keep working on the long term. Project is already set to run them automatically in travis. |
I've had not a much time this afternoon. The next week, I will not have lot of time too, but probably some hour the next week-end. I believe we must customize https://datatables.net/plug-ins/filtering/row-based/range_dates#Example . Could wait until the next week-end? |
Sure, we can have a look next weekend. I did find the same links and examples as you. I also found vedmack/yadcf (Yet Another DataTables Column Filter) which has a few filters. It does support daterange, see server side source example. Its date range filter uses jquery-ui and it feels old, but it could be a first working step for the date range. Thanks for investigating this, have an awesome week. If we go the acdf way, implementation should look something like that: yadcf.init(oTable, [{
column_number: 3, // date column numer, not sure if its the right one
filter_type: "range_date",
date_format: "mm/dd/yyyy",
filter_delay: 500
}]) |
yadcf also support bootstrap datetimepicker with moment, read more in the docs - datepicker_type and here is the link to a relevant showcase page. In addition, I hope to finish the integration of another bootstrap plugin soon vedmack/yadcf#435 |
Hi
Thanks for your work. What is your plan for the future development ?
I believe a good feature who was in Norwell was the query search, especially the « - » operator. Example: « history -google ». It's a very good feature, not implemented in the built-in Firefox history.
Do you think implement this soon ?
The text was updated successfully, but these errors were encountered: