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

On chart edit page a chart isn't visible fully #113

Open
smacker opened this issue Jun 17, 2019 · 6 comments
Open

On chart edit page a chart isn't visible fully #113

smacker opened this issue Jun 17, 2019 · 6 comments
Labels
bug Something isn't working product-design Visual, branding, typography

Comments

@smacker
Copy link
Contributor

smacker commented Jun 17, 2019

Screenshot 2019-06-17 at 12 15 43

Regression after the redesign.
It has lables on x axis. But I can't see them here. Only on the dashboard.

@smacker
Copy link
Contributor Author

smacker commented Jun 17, 2019

Actually it is REALLY BAD. I was trying to fix some other charts and I can't because I don't see changes and can't understand what the chart is showing. It would prevent creating new charts as well.

@carlosms carlosms added the bug Something isn't working label Jun 18, 2019
@marnovo
Copy link
Member

marnovo commented Jun 20, 2019

Same comment as in #114 (comment):

@smacker @ricardobaeta isn't this caused (or fixed) by some layout or overflow property?

@smacker
Copy link
Contributor Author

smacker commented Jun 20, 2019

I would suggest making Long title s... instead of displaying it fully and breaking the layout. To do that, there should be some overflow property for sure.

@ricardobaeta
Copy link
Contributor

@smacker Thanks!

@dpordomingo
Copy link
Contributor

As far as I could test it, this problem is already happening in current master, so I'd say it's related to superset itself, istead of to typography issues, so imo it should not block typography development.

The problem appears when the chart title is long enough that it does not fit in the browser window, no matter if we use branding-typography branch or master. I managed to find one example of a chart that we already have in master, that already breaks the chart as described in this issue.

Imo it's a good idea to fix the bug, but due to our current time limit I'd purpose to do a "patch" or workaround, that will work in "all" circumstances:

  • consider a minimum window width for our users (let @ricardobaeta or @marnovo choose it)
  • define a max-width + ellipsis for the chart title
    • if the user has a wider window, we'll waste a bot of space between the ellipsis and the buttons
    • if the user has a thinner window, the bug will be still there

As a v2 solution could be to use breakpoints to avoid edge cases as described above.
As a v3 solution could be to rework chart markup/css to be fully fluid.

imo v2 or v3 should be done in the next iteration, and release the beta with the quick fix.

example:
max-width: 358px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

You'll find below two examples of how our current charts are affected by this issue already in master

👇 Enough window size:
image

👇 Smaller window size:
image


And same data with a different chart layout.

👇 Enough window size:
image

👇 Smaller window size:
image

@marnovo
Copy link
Member

marnovo commented Jun 20, 2019

@dpordomingo, I was seeing this now with @ricardobaeta and propose using this option:

define a max-width + ellipsis for the chart title

But with a twist: We since it's about defining an arbitrary width, we can do this using
calc() like:

calc(total width of the container, e.g. 100% - width of the maximum size of the top right toolbar, e.g. xx px or whatever metric we use)

This way the ellipsed element width can vary based on the window size, reducing wasted whitespace (since the toolbar width varies less than the overall container) and making it much less likely to break at small widths.

Example: https://www.w3schools.com/code/tryit.asp?filename=G595AP15C6RU

@carlosms carlosms added the product-design Visual, branding, typography label Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product-design Visual, branding, typography
Projects
None yet
Development

No branches or pull requests

5 participants