Properties and user metadata representation in the GUI
update
I refactored the search tabs after merging @ladinesa changes. There are still problems, the most dramatic is that the statistics loading takes to long. There are too many default statistics. This means changes to the ES index and should be done quickly, as long as we are still reprocessing/indexing:
-
remove default statistics from datamodel and API, allow to requests specific statistics -
merge all quantity statistics (electric, optic, forces, ...) into one quantities
statistics and split it in the GUI
The histograms do not grow anymore, good, but their behaviour is still to volatile. Also adding statisticsToRefresh
in api.js
is not good. Its to specific and this function needs to be closer to where it is needed (e.g. the histograms)
-
we should split the histogram into two components, one inner one just drawing the chart, the other for title, scale picker, sorting values, keeping track of last values in state -
the histogram have state and only update values and their order, if there are new ones from the api -
the last points should replace the statisticsToRefresh
solution
Maybe it is a good idea to put some of the logic into the backend. The quantities with a fix set of values (a.k.a enums, e.g. system type, crystal system, compound type, xc functional, basis set...) could always return a metric for all values even if it is null. This way the gui does not need to "fill in the 0s".
The date histogram is getting better, but there is room for improvement.
-
date histogram: copy the tooltip implementation from QuantityHistogram
-
date histogram: remove the refresh (why?) button -
date histogram: add a title, the top should be consistent with the other cards: title ..... linear, maybe the datepicker should go far left and far right below the chart (there is an unnecessary space anyways) -
the "resolve_interval" should not be part of the API, but rather move into "search.py", more specifically into the date histogram related functions.
old issue
-
there are too many springer compound classes, es should sort by ammount and we only display top n(=10?). -
some of the springer classifications are too long and should be ellipsed (e.g. 'charge-density wave state...') and have a tooltip with full name. -
date histogram should set intervals automatic, no user option -
date histogram time axis must adopt correctly, e.g. show month+year if span > 1year -
date histogram form elements have wrong vertical alignment -
data histogram metric axis needs 10^n tick value formats -
top uploaders must be sorted by ammount by elasticsearch -
date histogram and uploaders should be on their own cards -
Top uploaders should be just labeled Uploaders to not hurt anyone's feelings ... scientists are sensitive -
date histogram bucket tooltip needs date format -
all chart tooltips should use the material-ui tooltip component -
we need better defaults for the power/linear scale settings ... here we should wait for more data. -
the charts top uploader and springer ... 'grow' (see explanation below) -
the code that was added/edited has widely inconsistent formatting, activate ESlint in your editor
The QuantityHistory
component has a feature where is remembers values to display them even if they do not appear in the data anymore. This was done to show the values even with ammount 0 upon adding search criteria. For the top uploader and springer ... this creates a problem. These charts are supposed to only display a subset. Due the this feature they basically show old values with now ammount 0 when filters are added. As a side effect they grow in size, because they display more and more values. The remember values features must be made optional and not used for top uploader and springer ... charts.