Skip to content

Conversation

@jfrost-mo
Copy link
Member

@jfrost-mo jfrost-mo commented Sep 22, 2025

CSET output interface improvements developed during my MSc project.

Additional work will be required before merging; see the "Future Work" chapter of my dissertation. This branch will also need a good rebase, as the commit history is a mess, and there were large test files added during development that have been removed, and we don't want to pull them into the project history permanently.

GitHub Copilot was used for review and fix suggestions for the prototype python parser, which was then hand ported to JavaScript. That code has been rebased away.

TODO

  1. Fix bugs in parser/web interface. - Done, though probably wants more testing.
  2. Introduce a three column layout, as it is commonly requested. Pushed out to Three column layout for web interface #1870.
  3. Tweak the CSS to make it look pretty.
  4. Add query help text and examples to the UI.

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@jfrost-mo jfrost-mo self-assigned this Sep 22, 2025
@jfrost-mo jfrost-mo added the enhancement New feature or request label Sep 22, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 22, 2025

Coverage

@jfrost-mo jfrost-mo changed the title WIP Add search capability to CSET UI Add search capability to CSET UI Sep 24, 2025
@jfrost-mo jfrost-mo changed the title Add search capability to CSET UI Add faceted type-ahead search capability to CSET web interface Oct 17, 2025
@jfrost-mo

This comment was marked as resolved.

@jfrost-mo

This comment was marked as outdated.

@jfrost-mo jfrost-mo force-pushed the MSc_ui_improvements branch 4 times, most recently from 4edac77 to 7ed878c Compare January 9, 2026 16:50
@jfrost-mo jfrost-mo force-pushed the MSc_ui_improvements branch 2 times, most recently from 25f9105 to dff23c5 Compare January 12, 2026 09:13
@jfrost-mo jfrost-mo changed the base branch from main to 1049_cache_busting January 12, 2026 09:15
Base automatically changed from 1049_cache_busting to main January 13, 2026 13:38
@jfrost-mo jfrost-mo force-pushed the MSc_ui_improvements branch from 3a00a7b to e5c20e5 Compare January 14, 2026 11:07
@jfrost-mo
Copy link
Member Author

cset-web-ui-search Current web UI. Will need some CSS prettification before merging.

Additionally included is a conversion of the index to JSON Lines (In
theory it should be more efficient, but in practice we still load the
whole string first. At least it looks nicer in the index file.)

Non-useful entries are removed from the index before it is written, so
it only contains information the client will need.
Removes redundant negative operators and allows facets to be any
literal. Comparisons are now case insensitive.
@jfrost-mo jfrost-mo force-pushed the MSc_ui_improvements branch from e5c20e5 to bc07f67 Compare January 21, 2026 14:48
Copy link

@Pierre-siddall Pierre-siddall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good James, you've definitely had a good understanding of the lexer and have implemented clever regex to match the different range of search queries a user may input. Equally, you clearly have demonstrated that you know how the DOM functions by construing HTML elements being added to or removed from the DOM via javascript. I only have a couple of tiny improvements here regarding informative variable names in order to help future developers understand the control flow of your javascript by knowing what is being operated on. However, overall I think this is a well justified piece of work, great job :) .

let cond_func;
switch (operator) {
case Operator.IN:
cond_func = function cond_in(d) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small thing here in term of making it easier to understand the javascript, I reckon this class would be easier to read if d had a slightly more informative name for the data being passed to the function.

Comment on lines +548 to +550
function updateFacetQuery(e) {
const facet = e.target.name;
const value = e.target.value;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to the previous comment I reckon that the e variable could have a slightly more informative name to make it crystal clear what is being operated on.

// responsiveness immediately perform the search if a space is typed, as that
// indicates a completed search term.
let searchTimeoutID = undefined;
function debounce(e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here e could be better named.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants