Search box gets a focus and the calendar highlighting uses
the default palette highlight -- only good for new installs
or if the user resets their colors but at least it now does
the right thing.
Need to test and fixup on Mac and Windows.
When the user free text searches or applies a data filter in
the top right toolbar search box it gets applied to any charts
that plot data from many rides, including;
- CP curve
- Calendar
- Histogram
- LTM
- TreeMap
- Summary
I need to update on a Mac to no longer use a Mac text search box
but now use a search filter box on the top right.
.. akin to the Mac look and feel
.. still needs a bit of cosmetic work, but basically sound
.. also added in fixes to native file imports
Fixes#404Fixes#504
Use the wrong stylesheet and are hard to read. This adjusts
tooltip and menu to make them more readable but may not be
ideal for those with heavily customised setups.
The named search dialog box uses the same style sheet as
the search box, which looks odd in a dialog box.
This patch ensures the stylesheet is only applied to the
search box and not any children.
The sidebar elements all get a blue focus rectangle on
Mac OSX. This is a platform specific setting. This patch
removes the focus rectangle for sidebar components only.
Last part of the search/filter functionality;
* SearchBox now incorporates filter and search
with a new widget. We can update this widget
to include more fancy UI/Interactions without
having to change the ride list or charts etc.
* Added search/filter widget to the relevant charts
and screens; Metrics, TreeMap, CP, Histogram,
Activity Log, Ride list (refactored out of MainWindow)
* Added namedsearches.xml and adding/selecting them
from a drop down menu on the search box.
* Fixed some performance bugs related to duplicate
signals and redraw/reprocessing. Also ensured that
CLucene remains optional -- but means no search or
filter functionality unless it is available.
Added evaluation of filters and integrated with the ride list, this
means the user can filter the rides listed.
Additionally the search box will highlight the filter in red if
it doesn't parse correctly, and a tooltip describes the errors.
Part 1 of Data filtering, this patch adds the ability
to enter and parse filter statements in the search box
(by clicking on the magnifying glass it becomes a filter
box).
The statements can reference metrics and metadata fields
allowing the user to define boolean expressions to filter
data. An example of the syntax;
Average_Power > 200 and Duration > 3600
This references the metric Average_Power and ride Duration. But
will also support operations on metadata fields, for example;
Workout_Code endsWith "SST"
The operators are;
= <> > >= < <= matches contains endswith beginswith
( ) && and || or
Filters are syntactically and semantically validated. But at
this point the resulting tree is not evaluated, i.e. we can
parse the filters, but do not execute them.
Two further updates are pending (once written and tested):
- Part 2 of 3 : Execute filters and apply to the ride list
- Part 3 of 3 : Allow named filters and apply to LTM charts
Further updates will support a visual editor and allowing filters
to be applied to CP and Histogram charts and affect the PMC stress
calculators.
1. Use the whitespace analyzer so its easier to search for
tokens that are a mix of letters and numbers e.g. workout
codes and TT route names.
2. Search as you type. Since we have very small collections
to search across (typically no more than a couple of thousand)
there is no major overhead in searching as you type.
3. Search all texts by default not just the Notes field. This is
a more appropriate default and is less likely to confuse new
users. In addition, it is most likely what most users want to
do anyway.