This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Jan 13, 2023
-
-
metamben authored
-
Braden Shepherdson authored
- Use currency-specific decimals count (eg. 0 for JPY, 8 for BTC) - Use plural currency names in Java, matching JS - previously: singular proper name "7.23 US Dollar" - now: plural prose "7.23 US dollars" - "Small numbers" hack to treat min/max fraction digits as significant digits now applies to percentages under 1%, as well as the original |n| < 1
-
Mark Bastian authored
* Fixed regex for latitude name type matching * Grouping regexes by lon/lat
-
Braden Shepherdson authored
This adds a cross-platform date/time formatting library in CLJC, with (nearly) identical output in both JVM and JS environments. The only known difference is week numbers. CLJS (through Moment.js) has ordinal numbers, and renders the week number as "34th". Neither the JVM nor Clojure has a handy library for this (I'm sure it's out there somewhere, but it seems like a silly dep to add) so it renders week numbers as simply "34". Both platforms have date formatters that use pattern strings (eg. `"YYYY-MM-dd"`) to turn date/time objects into strings. There's a strong resemblance in how these work and what letters stand for what parts of the date and time, but they are far from identical. Rather than try to hackily convert one set of strings to another with regexes or other manipulations, this PR defines a set of names for fragments of dates (eg. `:year`, `:day-of-week-full`, `:hour-24-dd`) and includes functions to transform a list of these keys into a platform-specific format function. This is portable and transparent, and can be written in Clojure or JS code: ```clj [:year "-" :month-dd "-" :day-of-month-dd] ; 2022-04-08 [:month-full " " :day-of-month-d ", " :year] ; April 8, 2022 [:hour-12-dd ":" :minute-dd " " :am-pm] ; 7:52 AM ``` ```js [":year", "-", ":month-dd", "-", ":day-of-month-dd"] ; 2022-04-08 [":month-full", " ", ":day-of-month-d", ", ", ":year"] ; April 8, 2022 [":hour-12-dd", ":", ":minute-dd", " ", ":am-pm"] ; 7:52 AM ``` Note that the original code allowed an unrecognized `:date-style` string to be used directly as the formatting string. With the move to formatting data structures that no longer works. Instead there is a fixed map of format strings to the above data structures, that contains all the currently used `:date-style` inputs. If some caller needs a new format someday, we can either: (a) add the style to the map; or (b) pass the data structure form directly to the `:date-format` option, which if provided is used as the format. It's tempting to go to all the call sites and replace these `:date-style` strings with the new format structures. However, the strings are still embedded in the `:visualization_settings` in user appDBs, so we still need to recognize them. Most of the existing functions in the TS library have the same API. The set of allowed `:date-style` and `:time-style` values is turned into a type using `keyof`, so that we get precise type-checking of these values rather than simply `string`. One function has been dropped from the API: `getDateFormatFromStyle`. There was no practical way to implement it using the new format data structures. The only caller was the date format column settings, and it has been rewritten to use the formatted string for its sample date as its key instead.
-
Nemanja Glumac authored
-
- Jan 12, 2023
-
-
Aleksandr Lesnenko authored
-
Bryan Maass authored
* updates + updates tests - use titles for everything - repeat "sounds" right - biding time to remerge upstream * Update src/metabase/util/malli/describe.clj * pluralize times ouhgt to be private * keep error messages in tests in sync
* linter newline -
Aleksandr Lesnenko authored
* revert new tooltips for non-stacked series * types
-
dpsutton authored
* restore aliases before annotating * cleanup * fix tests * Don't add escaped->original if aliases have not changed No need to walk and replace the aliases if they are identical. And in that case, no need to keep a mapping of identical to identical. Not super important but saves some time and complexity, and keeps other tests passing since the presence of [:info :alias/escaped->original] in the query caused them to trivially fail. * oracle has a smaller limit and _expected_ mangled previous testing behavior was "what happened" and not what should happen. we fixed the bug but the "expect garbage" behavior was still present * Relax :alias/escaped->original schema oracle tests use keywords for the alias ```clojure {:alias/escaped->original {:test-data-venues--via-a763718f "test_data_venues__via__venue_id", :test-data-users--via--user-id "test_data_users__via__user_id"}}} ``` No idea why that is keyworded * relax `:alias/escaped->original` schema see previous commit
-
Ryan Laurie authored
* add PivotTable unit tests * allow dynamic pivot table header width * access settings using metabase/lib * fix comments
-
Jeff Bruemmer authored
-
Anton Kulyk authored
-
Alexander Polyankin authored
-
Alexander Polyankin authored
-
- Jan 11, 2023
-
-
Bryan Maass authored
* - ensure errors are strings + provide strucrual hints Instead of just overwriting the (string) erorr messages, swap in the malli string description at [:errors :<field-name>] key. Adds humanized error (which highlights which parts of req were not sufficient) under the :specific-errors key. * fix tests + note about auto-cohersion
-
Cam Saul authored
* Switch to Honey SQL 2 for some application DB things * Fix Chain Filter query * More fixes * Test fixes :wrench * Fix Kondo lint errors * Test fixes
* Test and formatting fixes for MySQL * Fix new code using `db/query` * Fix circular references * Switch to Honey SQL 2, Part 1 * Test fix * Revert deletion of ratios-test * Fix Kondo error * Fix stack overflow * Update code to use new names for schemas -
Ryan Laurie authored
* make model detail work in master * bring basic model detail page in * Remove page URL helper leftovers * Rename `Urls.dataset` into `Urls.model` * Add tests to `Urls.model` * Move `Urls.model` to its own file * Add `Urls.modelEditor` * Use correct URL helpers in model detail page * Add link to query editor * Extract `ModelDetailHeader` component * Small readability fix * Clean up `QuestionMoveToast` * Fix model archiving * Add move and archive actions * Add border below tab controls * Fix import * Add page title * Extend server mocks * Fix console errors * Add `role: dialog` to `Modal` * Add tests * Add `ActionsContainer` to `PinnedItemCard` * Handle read-only model permissions * Remove data app leftovers * Don't add `result_metadata` to shared mocks * Fix spacing * Fix i18n * Remove `console.warn` block * Fix import * Fix type error * Add links to reach the model detail page (#27628) * Add `Urls.modelDetail` helper * Add `ModelDetailLink` component * Clean up `PinnedItemCard's` unit tests * Add model detail link to `PinnedItemCard` * Clean up `BaseItemsTable's` unit tests * Add model detail link to `BaseTableItem` * Add model detail link to model info sidebar * Fix tests * Fix spacing * Add tooltip Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com>
-
Jeff Bruemmer authored
-
Alexander Polyankin authored
-
Nemanja Glumac authored
* Removed forced `node-forge` resolution It now resolves to the `version "1.3.0"` anyway. * Removed forced `nanoid` resolution It now resolves to the `version "3.1.31"` anyway. * Removed forced `immer` resolution It doesn't appear in the list of dependencies anymore. * Removed forced `prismjs` resolution It doesn't appear in the list of dependencies anymore. * Removed forced `minimist` resolution It now resolves to the `version "1.2.6"` anyway. * Removed forced `nth-check` resolution It now resolves to the `version "1.0.2"` anyway.
-
Aleksandr Lesnenko authored
-
Ngoc Khuat authored
* move malli schema from metabase.util.schema to a new ns metabase.util.malli.schema * revert name changes for plumatic schema. e.g: NonBlankStringPlumatic -> NonBlankString * add clj-kondo rule to enforce consistent alias for metabase.util.malli.schema
-
Alexander Polyankin authored
-
Jeff Bruemmer authored
-
Tim Macdonald authored
* Warn when cards used for filtering are archived * filter-values -> dropdown-widget-values * Better string concatenation * dropdown_widget_values_usage_count -> parameter_usage_count * Add end-to-end test
-
Alexander Polyankin authored
-
Ngoc Khuat authored
* add default values keys for dashboard.parmaeters * fix tests and add tests
-
Cam Saul authored
* Switch to Honey SQL 2, Part 1 * Test fix * Fix Kondo error
-
Tim Macdonald authored
[Fixes #27216]
-
- Jan 10, 2023
-
-
Anton Kulyk authored
-
Anton Kulyk authored
* Delete `QuestionHistoryModal` * Delete `HistoryModal` * Delete `AdminEmptyText` * Delete `EditWarning` * Delete `Expandable` * Remove a bunch of question loaders * Delete `CandidateListLoader` * Delete `QuestionName` * Revert "Remove a bunch of question loaders" This reverts commit 209dbac68dec92083d6e3bdf34ff42ace76a3870. * Remove `QuestionAndResultLoader`
-
Tim Macdonald authored
* Do not let API users archive the last superuser [Fixes #26759] * DRY up admin-archiving check * Fix is_superuser bug in with-single-admin-user * Get count of values correctly on H2
-
Tim Macdonald authored
We were explicitly keeping ParameterCards and dashboard.parameters in sync, but that's not necessary
-
dpsutton authored
* fix api/database/<id>/fields to include table's name including name and display name for field, and table name (not display name) which was original complaint. * tests
-
Alexander Polyankin authored
-
Anton Kulyk authored
* Convert `VirtualizedList` to TypeScript * Add `VirtualizedSelectList` component * Virtualize raw table list * Virtualize model and question list * Fix rendering virtualized lists in tests
-
Anton Kulyk authored
* Move out `ArchiveQuestionModal` * Move out `QuestionMoveToast`
-
Anton Kulyk authored
* Install and enable plugins * Run eslint auto fix * Fix linter issues (part 1) * Fix Visualization test * Fix Pie Visualization test * Add `getIcon` and `queryIcon` helpers * Fix `VisibilityToggler` tests * Fix `QuestionActivityTimeline` tests * Fix formatting tests * Fix `EntityMenuItem` tests * Fix `ClampedText` tests * Fix `ObjectRelationships` tests * Fix `EmailAttachmentPicker` tests * Fix `SavedQuestionHeaderButton` tests * Fix `DatabaseEngineWarning` tests * Fix `Tooltip` tests * Fix `TippyPopoverWithTrigger` tests * Fix `TippyPopover` tests * Fix `TableLabel` tests * Fix `TableInfo` tests * Fix `ModerationStatusIcon` tests * Fix `Sidebar` tests * Fix `PermissionSelect` tests * Fix `PinnedItemCard` tests * Fix widget tests * Fix `DimensionSemanticTypeLabel` tests * Fix `ListSearchField` tests * Fix `ControlledPopoverWithTrigger` tests * Fix `FieldFingerprintInfo` tests * Fix `ErrorActionButton` tests * Fix `QueryValidationError` tests * Fix `LineAreaBarRenderer` tests * Fix `DataSelector` tests * Fix `PivotTable` tests * Fix `ItemPicker` tests * Fix `TokenField` tests * Fix `TagEditorParam` tests * Fix tests * Fix tests * Run prettier * Fix tests
-
Tim Macdonald authored
[Fixes #16293]
-
- Jan 09, 2023
-
-
Aleksandr Lesnenko authored
* allow including weekday to formatted dates * specs
-