Skip to content

Conversation

@AlexJanson
Copy link
Collaborator

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

As a user, it is difficult to see that object tree can be filtered by name. Thus, the search input text (from top right in header) should be moved in the table header in a nice UI and UX manner.

Moreover, the (collapse all tree button) should be moved also in the table header(right most).
Moreover, the sort by name buton should also become part of the header so that when the user clicks on the header Name column, to display a sort icon up, or down or nothing depending on what is currently being sorted.
See for example how Bookkeeping sorts by Title on page "Log Entries" (log-overview)

Copy link
Member

@graduta graduta left a comment

Choose a reason for hiding this comment

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

Right now, the actionable buttons/search have not been moved to the table header, but instead at the top of the table.
Could you have a look at some ag-grid tables which offer the search input integrating in the header to provide a better UX? Somewhere under the name but in the headear of the table
While the collapse all can also be in the header most right

@AlexJanson AlexJanson requested a review from graduta January 7, 2026 12:35
Copy link
Member

@graduta graduta left a comment

Choose a reason for hiding this comment

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

Implementation wise, it works very well and the virtual table is once again not blocking the page.
Good job!

I left a few comments with regards to design and documentation

* @readonly
*/
export const SortDirectionsEnum = Object.freeze({
NONE: 0,
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to actually not have them sorted? I did not manage to get the UI in such a state.
Perhaps we should remove the option if that is the case?

'button.btn.sort-button',
{
onclick: () => onclick(label, nextSortOrder, hoverIcon),
title: `Sort by ${directionLabel}`,
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps you meant: Sort ${directionLabel} by Name?

const objectsToDisplay = objectsLoaded.filter((qcObject) =>
qcObject.name.toLowerCase().includes(searchInput.toLowerCase()));
return virtualTable(model, 'main', objectsToDisplay);
return h('.scroll-y.flex-column.flex-grow', [
Copy link
Member

Choose a reason for hiding this comment

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

Is there a need for scroll-y on this? The table header should remain on top rather than being part of the scroll

h('tbody', [treeRows(model)]),
h('table.table.table-sm.text-no-select', h('tbody', [treeRows(model)]));

const tableHeaderRow = (model) => h('.bg-gray-light.pv2', [
Copy link
Member

Choose a reason for hiding this comment

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

This method does not need the entire root model.
I think it is better to send only the object one.

Moreover the method is missing documentation.


const tableHeaderRow = (model) => h('.bg-gray-light.pv2', [
sortableTableHead({
order: model.object.sortBy.order,
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be nice to destruct the sortBy JSON before creating the node (same method tableHeaderRow but with a return statement returning the node rather than node being returned by arrow function) and assign default values to order and icon

order: model.object.sortBy.order,
icon: model.object.sortBy.icon,
label: 'Name',
sortOptions: [SortDirectionsEnum.ASC, SortDirectionsEnum.DESC],
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to add "None" here as well?

h('tbody', [treeRows(model)]),
h('table.table.table-sm.text-no-select', h('tbody', [treeRows(model)]));

const tableHeaderRow = (model) => h('.bg-gray-light.pv2', [
Copy link
Member

Choose a reason for hiding this comment

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

I think the naming of these two methods is not clear enough.
tableHeaderRow is actually not a single row, right? But instead contains the Name of column header and another row with search input
On the other hand tableHeader is kind of a row but not a table and not a header but instead a div.

Try to come up with better descriptive namings

Copy link
Member

Choose a reason for hiding this comment

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

All the newly added methods in this file are missing documentation. Please make sure to add


const directionLabel = Object.keys(SortDirectionsEnum).find((key) => SortDirectionsEnum[key] === nextSortOrder);

return h(
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be good to keep the same UX/UI for the users as for other applications that we develop.
Please have a look at Bookkeeping on what design they use and try to implement a similar one: attaching here a screenshot but perhaps running BKP locally would be more helpful

Image

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

Development

Successfully merging this pull request may close these issues.

3 participants