quickwit icon indicating copy to clipboard operation
quickwit copied to clipboard

Make dev XP nicer with the UI

Open fmassot opened this issue 3 years ago • 0 comments

Working on the UI or something related to it requires building the UI with the latest JS/TS code.

Problem 1

With the current setup, the following annoying scenario can happen:

  • you build the UI with yarn
  • you work on the codebase
  • you execute cargo r run
  • you can go to localhost:7280/ui and check it works

The problem is that the assets served by the server are not updated, so you may think it works (or not).

Problem 2

To publish quickwit with cargo, we need to commit the UI-built assets. This is not currently done.

Proposed solutions

Solution 1 (lame)

A simple way to avoid this issue is to... force the developer to use yarn start to start the UI. This means that the quickwit server in dev mode will not serve UI assets in dev mode by default. We could display a message to the user on a GET request to HTTP://localhost:7280/ui.

We also need to commit the assets for the releases. We can do it in a specific directory only used when building the binary.

Solution 2

Do something smarter (I will complete this in 1 day).

Bonus

Additionally, it would be very nice to put the git info in the built react app and show it in the nav bar or somewhere at the bottom.

fmassot avatar Jun 07 '22 22:06 fmassot