Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap/monitor #6421

Merged
merged 3 commits into from
Dec 4, 2018
Merged

Bootstrap/monitor #6421

merged 3 commits into from
Dec 4, 2018

Conversation

ChrisBr
Copy link
Member

@ChrisBr ChrisBr commented Nov 30, 2018

The project build montior table is now a DataTable and
all filter / search is performed in the DataTable now
instead of on the Server.

The monitor action still allows server filtering by passing parameters.
We still need to support this because of existing links.
However, when we already filtered on server side, the rendered table would
only contain a the filtered list which causes the client search to not
work as expected.

For now, we just disable the client search in this case and show a button
to remove all server side filters. This does a simple roundtrip to the server
without parameters which enables us to activate the client search again.

selection_015

image

project-monitor

@Ana06 regarding revert of 3e45c4b, it does hurt, see screenshot 😄

selection_018

@ChrisBr ChrisBr added Frontend Things related to the OBS RoR app review-app Apply this label if you want a review app started Bootstrap 🚀 Bootstrap migration labels Nov 30, 2018
@obs-bot
Copy link
Collaborator

obs-bot commented Nov 30, 2018

Review app will appear here: http://obs-reviewlab.opensuse.org/chrisbr-bootstrapmonitor

@ChrisBr
Copy link
Member Author

ChrisBr commented Nov 30, 2018

Copy link
Contributor

@dmarcoux dmarcoux left a comment

Choose a reason for hiding this comment

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

Nice work! One question, why do we have this gap in the datatable?

Here's what I mean as highlighted in the screenshot below:
datatable-gap

src/api/app/views/webui2/webui/project/monitor.html.haml Outdated Show resolved Hide resolved
%td
= link_to word_break(packname, 40), :controller => "package", :action => "show", :package => packname, :project => @project.to_s
- @repohash.sort.each do |repo, archlist|
- archlist.sort.each do |arch|
Copy link
Member

Choose a reason for hiding this comment

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

isn't this already sorted? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently not, no

Copy link
Member

@Ana06 Ana06 Dec 3, 2018

Choose a reason for hiding this comment

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

I think it comes sorted from the backend.... 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

How do you know? I would keep it for now, that is c&p from the old view.

src/api/app/assets/stylesheets/webui2/webui2.css.scss Outdated Show resolved Hide resolved
@ChrisBr
Copy link
Member Author

ChrisBr commented Dec 3, 2018

Nice work! One question, why do we have this gap in the datatable?

This is the https://datatables.net/reference/option/scrollCollapse option. The reason is that otherwise the page size will jump all the time which is also not a nice experience. But I don't care too much, if you would like to collapse it, I'm fine with it too.

@dmarcoux
Copy link
Contributor

dmarcoux commented Dec 3, 2018

@ChrisBr I think I would prefer to collapse it.

@bgeuken
Copy link
Member

bgeuken commented Dec 3, 2018

Nice work 👍

Two things I noticed:

  • When accessing the monitor page via a link (pre-filtered), e.g. via the build result links, the filters are not shown, but there is a flash notification.
  • The legend is a bit narrow and long. I think by making it wider we can make better use of the space.

@ChrisBr
Copy link
Member Author

ChrisBr commented Dec 3, 2018

When accessing the monitor page via a link (pre-filtered), e.g. via the build result links, the filters are not shown, but there is a flash notification.

@bgeuken that is correct as then the result is already prefiltered on the server, allowing client side search does not make much sense then. In this case we add a button to remove the filter. See my description:

The monitor action still allows server filtering by passing parameters.
We still need to support this because of existing links.
However, when we already filtered on server side, the rendered table would
only contain a the filtered list which causes the client search to not
work as expected.

For now, we just disable the client search in this case and show a button
to remove all server side filters. This does a simple roundtrip to the server
without parameters which enables us to activate the client search again.

@ChrisBr
Copy link
Member Author

ChrisBr commented Dec 3, 2018

The legend is a bit narrow and long. I think by making it wider we can make better use of the space.

This seems like a good idea.

selection_019

@ChrisBr
Copy link
Member Author

ChrisBr commented Dec 3, 2018

@dmarcoux here is a comparison when scrollCollapse is enabled:

Disabled:
monitor-whitespace1

vs.

Enabled:
monitor-whitespace2

As you can see, the whole page is basically jumping which adds a lot of noise. I don't like it to be honest.

@dmarcoux
Copy link
Contributor

dmarcoux commented Dec 3, 2018

It's clearly better to have scrollCollapse disabled. Thank you for the comparison GIFs.

Copy link
Member

@bgeuken bgeuken left a comment

Choose a reason for hiding this comment

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

Nice work 👍

@ChrisBr
Copy link
Member Author

ChrisBr commented Dec 4, 2018

I refactored the feature specs to use page objects:
3f8ed74

In case somebody is interested to read more about that, here are two nice resources:

Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

As already said, you need the .obs-dataTable class to solve the bug

ChrisBr and others added 3 commits December 4, 2018 15:21
The project build montior table is now a DataTable and
all filter / search is performed in the DataTable now
instead of on the Server.

The monitor action still allows server filtering by passing parameters.
We still need to support this because of existing links.
However, when we already filtered on server side, the rendered table would
only contain a the filtered list which causes the client search to not
work as expected.

For now, we just disable the client search in this case and show a button
to remove all server side filters. This does a simple roundtrip to the server
without parameters which enables us to activate the client search again.
The underlying issue got fixed in another way and this breaks
other functionality of the modal.

Co-authored-by: Ana María Martínez Gómez <[email protected]>
@codecov
Copy link

codecov bot commented Dec 4, 2018

Codecov Report

Merging #6421 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6421      +/-   ##
==========================================
+ Coverage    91.2%   91.21%   +<.01%     
==========================================
  Files         437      437              
  Lines       19668    19673       +5     
==========================================
+ Hits        17939    17944       +5     
  Misses       1729     1729

1 similar comment
@codecov
Copy link

codecov bot commented Dec 4, 2018

Codecov Report

Merging #6421 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6421      +/-   ##
==========================================
+ Coverage    91.2%   91.21%   +<.01%     
==========================================
  Files         437      437              
  Lines       19668    19673       +5     
==========================================
+ Hits        17939    17944       +5     
  Misses       1729     1729

@ChrisBr
Copy link
Member Author

ChrisBr commented Dec 4, 2018

coveralls hanging ...

@ChrisBr ChrisBr merged commit 2861dd2 into openSUSE:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bootstrap 🚀 Bootstrap migration Frontend Things related to the OBS RoR app review-app Apply this label if you want a review app started
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants