Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jul 02, 2024
  2. Jul 01, 2024
  3. Jun 28, 2024
    • adam-james's avatar
      Wrap non-latin characters in a span specifying working font (#44580) · 97575697
      adam-james authored
      * Wrap non-latin characters in a span specifying working font
      
      Fixes: #38753
      
      CSSBox seems to have a bug where font fallback doesn't work properly. This is noticeable when a font does not contain
      glyphs that are present in the string being rendered. For example, Lato does not have many international characters,
      so the rendered version of tables (that show up in Slack messages) will not render properly, making the card
      unreadable.
      
      Since this appears to be a downstream bug, I've opted to work around this limitation by wrapping any non-latin
      characters in a <span> that specifies the font family to be sans-serif, which should contain the glyphs to properly
      render.
      
      This leaves Lato in place for other characters.
      
      For now, I figured it's worth trying this solution over using Noto for 2 reasons:
      - we can keep Lato, which has been the decided font style for the app for some time (this keeps things consistent
      where possible)
      - the Noto font containing all glyphs is quite a large font (>20mb, I think) and it would be nice to avoid bundling
      that if we can.
      
      * stub installed fonts test
      
      * typo
      
      * Do wrapping, but now per-string, and in Clojure data not html string
      
      I've decided that a reasonable solution is to still wrap strings containing non-lato characters. But it's not done
      with str/replace to the html string but rather in a postwalk over the Hiccup data prior to rendering.
      
      Seems like a decent compromise of issues without patching CSSBox or fixing upstream (may be good to do, but will take
      longer to get a fix in).
      
      * add test checking that glyphs render correctly
      
      * Add a test that directly checks the wrapping fn
      
      * Change the string to keep the linter quiet
      
      * Change how we check if string can be rendered to faster method, new Lato Font
      
      With Sanya's help, the way I check if a given string is renderable with Lato is now faster.
      
      Also use the full Lato font, not just the 'latin' lato so we can cover more chars
      
      * change lato so that it loads the fn even in a fresh test run
      Unverified
      97575697
    • Aleksandr Lesnenko's avatar
      improve cartesian charts performance (#44861) · 6f91db0e
      Aleksandr Lesnenko authored
      * improve cartesian charts performance
      
      * drop unused import
      Unverified
      6f91db0e
    • Uladzimir Havenchyk's avatar
      Add a repro for 'Filter values in dropdown are not getting populated in SQL... · 53f58806
      Uladzimir Havenchyk authored
      Add a repro for 'Filter values in dropdown are not getting populated in SQL question based dashboard' (#44927)
      
      Unverified
      53f58806
    • Jesse Devaney's avatar
      Fix pin maps unnecessarily filtering out null values (#44853) · 43ed85df
      Jesse Devaney authored
      * prevent pin maps from filtering out rows with null values
      
      - since pin maps are just displaying where the data is by latitude and longitude, we do not need to filter the pin just because one of the rows is null.
      - the metric column selection does not make sense for pins as they just represent that data through coordinates (no aggregations or values displayed), so we should not be filtering out any data just because it is null
      
      * add unit test
      Unverified
      43ed85df
    • Alex Yarosh's avatar
      docs: add 50.8 (#44925) · 6d8f0779
      Alex Yarosh authored
      Unverified
      6d8f0779
    • Jeff Bruemmer's avatar
      ClickHouse note (#44929) · fb599094
      Jeff Bruemmer authored
      Unverified
      fb599094
Loading