Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 22, 2024
  2. Oct 15, 2024
  3. Oct 03, 2024
  4. Sep 09, 2024
    • Romeo Van Snick's avatar
      Browse metrics page (#47277) · d566fae9
      Romeo Van Snick authored
      
      * Add custom image for empty metrics
      
      * Add useFetchMetrics helper
      
      * Copy browse models page to metrics page
      
      * Add route for browse metrics page
      
      * Add useHasMetrics hook
      
      * Add link to browse metrics page to the sidebar
      
      * Simplify MetricsTable component
      
      * Render description markdown in table too
      
      * Add unit tests for browse metrics page
      
      * Remove custom padding
      
      * Fix line height of markdown cell
      
      * Add e2e tests for browse page
      
      * Fix metrics sorting
      
      * Fix types
      
      * Fix column widths and cell padding
      
      * Typo
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      
      * Remove name check
      
      * Simplify alphabet
      
      * Remove resetSnowplow
      
      * Use helper to get metric in table
      
      * Use MouseEvent from React directly
      
      * Use --mb-color-icon-primary
      
      * Test ellipsification of description
      
      * Simplify useHasMetrics
      
      * Move useHasMetrics MainNavBar
      
      * Merge sortMetrics and sortModels into sortCards
      
      * Fix metric default description
      
      * Extract SidebarSkeleton to a separate component
      
      * Test sorting via Collection too
      
      * Use ModelTableRow to fix cursor
      
      * Share more components between ModelsTable and MetricsTable
      
      * Use the same simplified structure in ModelsTable as for MetricsTable
      
      * Render block-level elements as inline so ellipsis detection works
      
      * Pick better testid for metric name
      
      * Remove delay
      
      * Avoid type specificty error in sortCards
      
      * Add test for not opening in new tab
      
      * Remove useFetchMetrics defaults
      
      * Fix unit test import
      
      * Test meta-click with cypress
      
      * Add comment on inline markdown elements
      
      * Use model-name test id
      
      * Use correct colors for icon
      
      * Remove delay from browse models page too
      
      * Make meta key in test platform-dependent
      
      * Fix hover color on metrics table
      
      * Add focus styling for celss in the models and metrics table
      
      * Use MarkdownPreview for table cells
      
      * Define --mb-color-icon-primary
      
      * Make the collection link take up the whole height of the cell
      
      * Remove tabIndex from table rows
      
      * Rename ModelsTable.module.css to BrowseTable.module.css
      
      * Rename CardsTable to BrowseTable
      
      * Remove single module.css class in favor of styled components
      
      * Allow customising allowed elements
      
      * Allow forcing all markdown on one line
      
      * Render bold and italics in markdown descriptions and move content onto one line
      
      * Fix legacy tooltip in test
      
      * Make sure getValueForSorting returns a string
      
      * Remove empty file
      
      * Remove icon for metrics in the table
      
      * Remove else statement.
      
      Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
      
      * Remove async findBy where possible
      
      * Add github issue link for TODO item
      
      * Disambiguate between getMetricDescription type
      
      * Be explicit with sortModelOrMetric
      
      ---------
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
      Unverified
      d566fae9
  5. Aug 05, 2024
    • Mahatthana (Kelvin) Nomsawadi's avatar
      [Milestone 2] Re-design transparent theme for static embedding and public links (#46428) · 3d5233bc
      Mahatthana (Kelvin) Nomsawadi authored
      
      * Update popover dark theme on part of ParameterFieldWidget (#45813)
      
      * Add filter visual tests
      
      * Simplify embed CSS colors
      
      * [WIP] theme filter popover
      
      * Move theme to global node, so it affects portal too
      
      * Fix embed colors
      
      * Theme part of ParameterFieldWidget
      
      * Add story for parameter with dropdown
      
      * Update loki snapshots
      
      * Update more popover style
      
      * Update loki snapshots
      
      * Remove outdated snapshots
      
      * Update loki snapshots with production build
      
      * Fix loki not working with `userEvent`
      
      * Theme mantine popover
      
      * Improve dark theme text-brand visibility
      
      * Update loki snapshots from master change
      
      * Fix new colors not working in SDK
      
      * Fix flaky Loki tests
      
      * Filter popover dark theme part 2 (#46284)
      
      * Theme Date all options
      
      * wip add month and year filter
      
      * Fix wrong CSS custom property declaration
      
      * Test hover state
      
      * Update Loki snapshots
      
      * Theme date month and year
      
      * Add quarter and year tests
      
      * Theme date single and date range
      
      * Style relative date
      
      * Update frontend/src/metabase/admin/datamodel/components/filters/pickers/DatePicker/DatePickerHeader.styled.tsx
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Complete theming filter popover night mode (#46365)
      
      * Style unit of time and number widget
      
      * Attempt to fix flaky Loki snapshots
      
      * Address white background checkbox on dark theme
      
      * Style search filter single value
      
      * Fix mis color
      
      * Update snapshots
      
      * Remove duplication on play functions since they're long
      
      * Milestone 2 polishing (#46382)
      
      * Matches the footer padding with header padding
      
      * Update snapshots
      
      * Add E2E to prevent further problem
      
      * Try to reduce flaky Loki tests
      
      * Remove unused color shades (#46421)
      
      * Update no results illustration to work better on dark theme
      
      * Update loki snapshots
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      Unverified
      3d5233bc
  6. Jul 17, 2024
    • Mahatthana (Kelvin) Nomsawadi's avatar
      [Milestone 1] Re-design transparent theme for static embedding and public links (#45633) · ffa54f0f
      Mahatthana (Kelvin) Nomsawadi authored
      
      * refactor: Simplify code (#44275)
      
      * Remove dead code
      
      * Remove values same as default options
      
      * Simplify hook API: Removing unused argument
      
      * review: Remove redundant code
      
      * Update look and feel copy (#44277)
      
      * Update static embed tab name
      
      * Update copies + rearrange settings
      
      * Use Mantine Select
      
      * Fix E2E tests by applying new copies
      
      * Fix unit tests
      
      * Fix more E2E tests
      
      * review: Add a comment on Mantine `value` quirk
      
      * Adjust spacing and relevant tests
      
      * Move `transparent` theme to its own toggle option (#44362)
      
      * Reorder the function to match the visual order
      
      * Make function name consistent
      
      * Introduce the new background option (do nothing yet)
      
      * Remove redundant exports
      
      * Tighten up values to reduce confusion
      
      * Make the parameters order consistent
      
      * Only show background option on dashboads (spec)
      
      * Allow dashboard embed background to be transparent
      
      * Make filter background and header/footer transparent
      
      * Fix type error
      
      * Fix unit tests
      
      * Fix E2E tests
      
      * Fix checkerboard pattern not showing when no background
      
      * Add unit tests
      
      * Add missing copy update
      
      * Remove remnants from outdated solutions within the PR
      
      * Improve code comment references
      
      * Fix E2E tests since the last copy change
      
      * Fix type errors from merging master
      
      * Update light theme style (#44488)
      
      * Add background to dashboard filter on light theme
      
      * Make position sticky works with transparent background
      
      * Fix sticky filters not working on theme=transparent
      
      * Fix unit tests
      
      * Simplify IntersectionObserver components + fix E2E tests
      
      * Add storybook for embedded dashboard
      
      * Clarify the use of ExplicitSize context
      
      * Remove unused code
      
      * Formatting
      
      * Review: Better mock `isWithinIframe`
      
      * Update dark theme to match the new design (#45134)
      
      * Update light theme checkerboard colors
      
      * Update checkerboard colors
      
      * Consolidate dashboard light/dark border style
      
      * Use `--mb-color-text-primary` for light theme dashboard
      
      * Update embed dashboard dark theme primary color
      
      * Migrate dashboard text-secondary color
      
      * Migrate text-tertiary color
      
      * Migrate gold, axis, and split line to CSS custom properties
      
      * Fix failed e2e tests
      
      * Fix static viz not working
      
      * Update loki snapshots
      
      * Remove unnecessary CSS custom property
      
      * Make diff more consistent
      
      * Address review: reusing type
      
      * Support backward compatibility when passing `theme=transparent` (#45214)
      
      * Match preview query with the actual code query
      
      * Handle backward compatibility when `theme=transparent` on dashboard
      
      * Add unit tests
      
      * Address review: Make tests less repetitive
      
      * Update Metabase banner upsell UI (#45424)
      
      * Prepare folder for nested components
      
      * Update upsell UI
      
      - add `fullWidth` variant
      - align title to the left
      
      * Fix Upsell banner having horizontal scroll on full width
      
      * Add new Metabase banner upsell component
      
      * Fix unit tests
      
      * Address review: Fix typo
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      
      * Address review: Move upsel UI to `admin/upsells`
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      
      * Remove unnecessary ESLint disable comment
      
      We can remove it since the file is in admin folder, and is already excluded from the rule.
      
      * Address review: remove default value property
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Address review: Extract magic number
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * More UI updates (#45450)
      
      * Update dark theme text colors to match the new design
      
      * Update powered by metabase logo
      
      * Update loki snapshots
      
      * Fix unit tests
      
      * Fix formatting
      
      * Fix wrong dark theme metabase logo badge color
      
      * Address review: Compress SVG with svgo
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Fix E2E tests
      
      * Update loki snapshots
      
      * Clarify Metabase base colors with comments
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Add more tests (#45628)
      
      * Add static embed question stories
      
      * Add loki snapshots
      
      * Add transparent theme for static dashboard tests
      
      * Add transparent theme tests for static questions
      
      * Assert `background` option in analytics tests
      
      * Remove tests for logic that has been moved
      
      * Update loki snapshots
      
      * Fix failed E2E tests from merging master
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <30528226+iethree@users.noreply.github.com>
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      Unverified
      ffa54f0f
  7. Jul 16, 2024
  8. 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
  9. May 20, 2024
  10. May 17, 2024
  11. May 16, 2024
  12. May 13, 2024
  13. Dec 20, 2023
  14. Aug 23, 2023
  15. Aug 15, 2023
  16. Jun 27, 2023
  17. May 26, 2023
    • Denis Berezin's avatar
      [Epic PR] Make drill-through chiller (#26836) (#30273) · 45dcf573
      Denis Berezin authored
      * Update underlying records drill - bring to top, label changes (#29984)
      
      * Zoom in Drill (#30208)
      
      * Add updated zoom drill title
      
      * Fix e2e tests
      
      * Add title unit tests
      
      * Fix for Records drill UI when it is the only one displayed
      
      * Review fixes
      
      * Add pivot drill common popover (#30275)
      
      * Add grouping for Pivot drill options
      
      * Reuse filterField type
      
      * Fix date formatting after rebase
      
      * Move Automatic insight action to a common popover (#30370)
      
      * Refactor ChartClickActionsView, reuse it component in drills (#30706)
      
      * 26836 separate views for quick cell click filters (#30532)
      
      * Added separate views for QuickFilterDrill
      
      * Add tests, fix styles issues
      
      * 26836 contains/does not contain quick filter for tables (#30778)
      
      * Add contains/does not contain quick filter for tables
      
      * Self review fixes
      
      * Fix for column header filter search options cropped
      
      * Fix for icon margin difference for contains / does not contain filters
      
      * Fix contains filter actions icon styles
      
      * Add quick filters support for aggregated queries
      
      * Not show contains filter for joined fields
      
      * Fix typecheck
      
      * Adjust string field quick filter section title to have column name (#30888)
      
      * 26836 Add View details action for quick filters (#30967)
      
      * Add View details action to quick filters
      
      * Self review fixes
      
      * Fix e2e tests
      
      * Fix review issues
      Unverified
      45dcf573
  18. Apr 05, 2023
  19. Jul 14, 2022
  20. Jul 12, 2022
    • Noah Moss's avatar
      First pass at parameters in Markdown cards (#23641) · e136f430
      Noah Moss authored
      * first pass at parameters in text cards on FE
      
      * trying to get translations working
      
      * relative datetime formatting
      
      * copy changes and 'Text card' header
      
      * default text when no params
      
      * hide header for text cards with height of 1 with params when in param mapping mode
      
      * show UI text in mobile mode
      
      * minor fixes
      
      * enforce that a text card variable can only be mapped to one parameter
      
      * more value formatting
      
      * noop
      
      * fix backend tests
      
      * add back a couple pieces of frontend logic commented out
      
      * misc cleanup
      
      * attempt at adding a FE unit test
      
      * revert unit test, doesn't work
      
      * add a couple of basic cypress tests and fix a couple of bugs
      
      * basic unit tests for cljc
      
      * fix error
      
      * expanded unit tests
      
      * simplify ns
      
      * add cypress test for instance language translation
      
      * basic handling for a couple cases of :date/all-options
      
      * trs docstring clarification
      
      * whitespace tweaks
      
      * fix cypress test
      
      * minor refactor of tag-names
      
      * move cljc file from utils to new parameters dir
      
      * reorder functions
      
      * fix lint
      
      * add test assertion that locale is correctly reset back to english, and add a comment
      
      * fix bug where existing parameter mapping target was not being found
      
      * clojure logic tweaks
      
      * move text card header text to the Text component config
      
      * simplify header logic, and pull out isLoading into a function to reduce complexity
      
      * address alex's css feedback
      
      * fix trs comment
      Unverified
      e136f430
  21. Jun 29, 2022
  22. Jun 26, 2022
  23. Jun 21, 2022
  24. Jun 13, 2022
  25. Jun 02, 2022
  26. Jun 01, 2022
  27. May 17, 2022
    • adam-james's avatar
      Whitelabelling users font family font setting (#22791) · 856c46e2
      adam-james authored
      
      * Add font utilities to derive list of available fonts from font dirs
      
      This PR adds two defsettings to facilitate Enterprise users' ability to set the font for their instance. The
      'available-fonts' can be grabbed by the frontend to populate the dropdown menu. The 'application-font' setting can be
      written by the frontend to save the chosen font.
      
      * Adding some fonts and font selector
      
      * Send  (("dirname", "font name"),) to frontend
      
      Instead of only sending a list of names, send a tuple of `[directory-name, Display Name]`
      
      * Adding half of the fonts
      
      * Font list derived from font directory/font file names
      
      This is an attempt to derive the 'Display Name' of a font by comparing the directory name to the file names. '_' is
      replaced with spaces, but '-' exists in the 'Lato' font directory name, and we may have naming confusion in the
      future. Basically, I want to be liberal with what font directory/file names we can receive.
      
      Not certain this is the right approach yet, but it will work and correctly provides names based on the fonts available.
      
      * Adding remaining fonts
      
      * Using Default Font family in visual components
      
      * Small change to fix some lint warnings
      
      * Removing Noto Sans JP
      
      * Move logging
      
      * Alter hardcoded font path
      
      * Added cypress test
      
      * Change Cypress Test to look for correct text
      
      * Added unit tests for fonts.clj, and simplified creating display name
      
      The display name approach is simple -> underscores become spaces, and names are split on dashes/first word is taken
      from the split.
      
      This might not be robust to future font installations, but will be a good v1
      
      * adding visual test
      
      * fixing cypress test
      
      * Actually add the unit tests
      
      * Fix lint problems
      
      * Add setter to application-font to prevent invalid font setting
      
      * Addressing PR review points
      
      - fixed 'normalize-font-dirname' description
      - 'contains-font-file?' returns true/false
      - 'available-fonts-test' now properly uses 'is'
      
      * Make font-path private
      
      * Lint error.
      
      * Modified fonts to use java.io/resource to hopefully work in a jar
      
      * Simplified Lato folder name
      
      * PR Cleanup
      
      * Address some backend feedback
      
      * Lint error from reflection with .toString on a path
      
      I removed the explicit .toString inside the lamdba functino and str/includes still works.
      
      * no longer need u.files in test ns
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      856c46e2
    • Howon Lee's avatar
  28. May 16, 2022
    • adam-james's avatar
      Add font utilities to derive list of available fonts from font dirs (#22612) · f106ebfd
      adam-james authored
      
      * Add font utilities to derive list of available fonts from font dirs
      
      This PR adds two defsettings to facilitate Enterprise users' ability to set the font for their instance. The
      'available-fonts' can be grabbed by the frontend to populate the dropdown menu. The 'application-font' setting can be
      written by the frontend to save the chosen font.
      
      * Adding some fonts and font selector
      
      * Send  (("dirname", "font name"),) to frontend
      
      Instead of only sending a list of names, send a tuple of `[directory-name, Display Name]`
      
      * Adding half of the fonts
      
      * Font list derived from font directory/font file names
      
      This is an attempt to derive the 'Display Name' of a font by comparing the directory name to the file names. '_' is
      replaced with spaces, but '-' exists in the 'Lato' font directory name, and we may have naming confusion in the
      future. Basically, I want to be liberal with what font directory/file names we can receive.
      
      Not certain this is the right approach yet, but it will work and correctly provides names based on the fonts available.
      
      * Adding remaining fonts
      
      * Using Default Font family in visual components
      
      * Removing Noto Sans JP
      
      * Small change to fix some lint warnings
      
      * Move logging
      
      * Alter hardcoded font path
      
      * Added cypress test
      
      * Change Cypress Test to look for correct text
      
      * adding visual test
      
      * fixing cypress test
      
      * Added unit tests for fonts.clj, and simplified creating display name
      
      The display name approach is simple -> underscores become spaces, and names are split on dashes/first word is taken
      from the split.
      
      This might not be robust to future font installations, but will be a good v1
      
      * Actually add the unit tests
      
      * Fix lint problems
      
      * Add setter to application-font to prevent invalid font setting
      
      * Addressing PR review points
      
      - fixed 'normalize-font-dirname' description
      - 'contains-font-file?' returns true/false
      - 'available-fonts-test' now properly uses 'is'
      
      * Make font-path private
      
      * Lint error.
      
      * PR Cleanup
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      f106ebfd
  29. Apr 23, 2022
  30. Apr 22, 2022
  31. Apr 20, 2022
  32. Apr 15, 2022
  33. Apr 01, 2022
  34. Mar 31, 2022
  35. Mar 21, 2022
  36. Mar 02, 2022
  37. Jan 28, 2022
Loading