Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Sep 01, 2022
    • adam-james's avatar
      Send show_values key to static-viz js (#25116) · 55f36d7c
      adam-james authored
      * Send show_values key to static-viz js
      
      The static viz components expect certain keys on the settings map passed into the js. At this time, the contract
      between the backend (Clojure) and the static-viz (js) feels a little under-specified. However, for the change to XY
      Charts here, we follow the existing method in code of checking the backend viz-settings map for some key, and passing
      it into js in a 'simplified' form. For instance, in this change, `:graph.show-values` is taken and placed into the
      settings map as `:show_values` for the static-viz js to use.
      
      * De-dupe key
      
      * Keep this PR super simple, don't eliminate sparkline stuff yet
      
      * Add :line earlier in cond, try to fix tests that fail
      
      * Get the :line conditional in the right place, allowing :scalar
      Unverified
      55f36d7c
    • Nemanja Glumac's avatar
      [E2E] Refactor repro for #21597 (#25193) · af801e63
      Nemanja Glumac authored
      * Fix native query
      
      * Replace deprecated `cy.server` and `cy.route`
      
      * Add database through API rather than using UI
      
      * Remove superfluous `visit`
      
      `openNativeEditor` already contains `cy.visit("/")`
      
      * Use Postgres instead of H2 for a second database
      
      * Speed typing up a bit
      
      * Do not use hard coded IDs
      
      * Update test title
      
      * Move spec to `native` reproductions
      Unverified
      af801e63
    • Nemanja Glumac's avatar
      [E2E] Handle #17450 failures (#25179) · c6a80fe5
      Nemanja Glumac authored
      * Temporarily skip repro for #17450 for H2 database
      
      * Reproduce #17450 using Postgres
      Unverified
      c6a80fe5
    • adam-james's avatar
      Format Pie Chart Legend Labels as Month, YYYY (#24890) · 482b061e
      adam-james authored
      * Format Pie Chart Legend Labels as Month, YYYY
      
      On the backend, the pie chart legend is not rendered in the javascript, it is instead re-created server side as a set
      of html elements. This means "YYYY-MM-DD" formatted dates do not get passed through the frontend code responsible for
      formatting date times (I believe this is done with a library called 'moment.js'). And, since the SVG cannot contain
      html foreignObjects (the backend SVG renederer 'batik' ignores foreign objects), the legend is left as a
      responsiblility for Clojure land.
      
      This PR adds a `format-month` function to handle this case.
      
      Current caveats with this approach:
      
      - doesn't consider localization (yet)
      - adjusted the html to use a table instead of a div full of spans and the formatting could use some tweaks
      - assumes any string that is parse-able into a Jave DateTime object will be displayed in this Month, Year format,
      - which might not be true in all cases
      
      * Improve label formatting by using viz-settings transform fns
      
      * Rework Static Pie Chart legend
      
      Try to make it look a bit nicer:
      - splits legends into 2 tables if there are more than 8 entries
      - larger colored circle
      - use tables to help lay things out more evenly (CSS flexbox doesn't seem to work)
      - handle some legend label formatting cases beyond just timestamps (eg weeks of year, yearly quarters)
      
      Also fixed the failing test
      
      * Adding a month formatter.
      
      Sometimes, the label values are not passed in as timestamps, but just numbers (as strings). In these cases, the
      Datetime formatters won't be useful, so there are some cases built to handle these.
      
      * Remove print statement
      
      * Change temporal format fns to more closely follow viz-settings
      
      Various changes are made to improve static-viz's use of viz-settings from the frontend.
      
      - abbreviation is considered (eg. so "January" is rendered as "Jan" when setting is true)
      - abbreviation also works for Days of week
      - x-of-y cases are handled a bit better
      - separator settings are properly reflected (eg. 2022/05 becomes 2022-05 if separator changed to "-")
      
      * Remove unused key from the let
      
      * Fix some failing tests
      
      * Adding more tests
      
      * Prevent non-temporal legend labels from being rendered via datetime
      
      If a legend's label is some string, we want to pass it unmodified. If it's a number or a timestamp, we can pass it
      through to the date time render function to format the string to match the viz-settings/column units
      
      * Add missed docstring
      
      * Don't lowercase 'D' format, pass correct lowercase 'd' before
      
      'D' format = day of year, which in most human-readable formats is not what we want, but it IS what we want in a
      :day-of-year case.
      
      Instead of always lowercasing, just make sure the lowercase 'd' is in the defaults/overrides
      
      * Better way to handle day of week and month of year
      
      Also got rid of bad use of read-string by using parse-long
      
      * Use a java lib. to format ordinal numbers, respecting site locale
      Unverified
      482b061e
    • Aleksandr Lesnenko's avatar
    • Aleksandr Lesnenko's avatar
      Pie chart labels (#25009) · fb35f2b5
      Aleksandr Lesnenko authored
      * pie labels
      
      * hide labels when no space for them
      
      * unused class
      
      * review
      
      * fix resizing issue, add visual test
      
      * mute invalid typings
      Unverified
      fb35f2b5
    • Gustavo Saiani's avatar
    • metamben's avatar
      Report page dashboard activities with model "page" (#25158) · 096bc8cf
      metamben authored
      Fixes #25143 and #25157.
      
      For recent_views and popular_items hydrate the is_app_page flag for dashboards.
      Unverified
      096bc8cf
    • Alexander Polyankin's avatar
    • Ariya Hidayat's avatar
    • Alexander Polyankin's avatar
    • Jeff Bruemmer's avatar
      docs - public link update (#25159) · 51e994a3
      Jeff Bruemmer authored
      * update link
      
      * note on public exports
      
      * images
      
      * readme link
      
      * link to install start
      Unverified
      51e994a3
    • Alexander Polyankin's avatar
  2. Aug 31, 2022
  3. Aug 30, 2022
Loading