Skip to content

Commit

Permalink
fix: made loading texts more discrete, fixed element growth after loa…
Browse files Browse the repository at this point in the history
…ding (causing UI to "jump")
  • Loading branch information
ErikBjare committed Jun 10, 2021
1 parent fe54dcc commit aee573f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/visualizations/Summary.vue
@@ -1,7 +1,8 @@
<template lang="pug">
div
div.aw-summary-container
div(v-if="fields && fields.length > 0 && with_limit && fields.length > limit_")
// Use visibility to make sure elements don't skip when data finishes loading
div(:style='{"visibility": visible ? "visible" : "hidden"}')
b-button.mt-1(size="sm", variant="outline-secondary", @click="limit_ += 5")
icon(name="angle-double-down")
| Show more
Expand Down Expand Up @@ -46,6 +47,13 @@ export default {
data: function () {
return { limit_: this.limit };
},
computed: {
visible() {
return (
this.fields && this.fields.length > 0 && this.with_limit && this.fields.length > this.limit_
);
},
},
watch: {
fields: function () {
this.update();
Expand Down
5 changes: 3 additions & 2 deletions src/visualizations/periodusage.js
Expand Up @@ -18,12 +18,13 @@ function set_status(svg_elem, msg) {

svg
.append('text')
.attr('x', '5pt')
.attr('x', '50%')
.attr('y', '25pt')
.text(msg)
.attr('font-family', 'sans-serif')
.attr('font-size', '20pt')
.attr('fill', 'black');
.attr('text-anchor', 'middle')
.attr('fill', '#AAA');
}

const diagramcolor = '#aaa';
Expand Down
4 changes: 2 additions & 2 deletions src/visualizations/summary.js
Expand Up @@ -31,8 +31,8 @@ function set_status(container, msg) {
.attr('y', '25px')
.text(msg)
.attr('font-family', 'sans-serif')
.attr('font-size', '25px')
.attr('fill', textColor);
.attr('font-size', '20px')
.attr('fill', '#999');
}

function update(container, apps) {
Expand Down

1 comment on commit aee573f

@github-actions
Copy link

Choose a reason for hiding this comment

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

Here are screenshots of this commit:

Screenshots using aw-server v0.10.0 (click to expand)

Screenshots using aw-server-rust master (click to expand)

Screenshots using aw-server-rust v0.10.0 (click to expand)

CML watermark

Please sign in to comment.