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

merge master into snowplow branch #38608

Conversation

npretto
Copy link
Member

@npretto npretto commented Feb 9, 2024

This is just to merge master and the latest changes into Add snowplow events for embedding setup flow (+1,503 −211)

piranha and others added 23 commits February 8, 2024 10:18
* Add `ADD_MANY_CARDS_TO_DASH` action

* Reuse `NewDashCardOpts` type

* Extract `DashboardCardLayoutAttrs` type

* Add basic `DashCardPlaceholder` viz

* Add section layouts

* Add `addSectionToDashboard` redux action

* Add `SectionLayoutPreview` component

* Add "Add section" button to dashboard header

* Allow placeholder cards in `replaceCard`

* Make heading cards transparent by default

* Fix layout fn usage

* Update mapping UI for placeholder cards

* Fix tooltips position

* Add `createMockPlaceholderDashboardCard`

* Test `replaceCard` works with placeholder cards

* Extract common `setup` from cards actions tests

* Add `createMockDashboardTab`

* Add unit tests for `addSectionToDashboard`

* Placeholder cards work for emails/pulses

Dashboards with placeholder cards now properly email rather than throwing an exception. Placeholder cards themselves are not sent as part of the email as they are empty.

* Merge remote-tracking branch 'origin/38209-dashboard-sections' into 38209-dashboard-sections

* Adding tests for placeholder cards and empty dashboards

* Fix parameter mappings UI

* Update section card sizes

* Clean up

* Add button label

* Add E2E test

* Revert

* Reorder

* Fix menu position

* Assert placeholder card doesn't have a button

* Fix menu tooltips

* Fixing unit tests

* Removed dangling code

* Fixing unit tests

* Remove virtual cards handling from `replaceCard`

---------

Co-authored-by: Mark Bastian <markbastian@gmail.com>
* Remove `setDatabaseID` method from the `StructuredQuery` prototype

* Remove `setDatabase` method from both Native and Structured queries
* Fix time-interval against expressions

When simplifying time-interval filters, we forgot to place a
temporal-unit on expressions, which meant that the date-trunc used by
quarters had to match the date exactly rather than being in the interval
range.

* Update optimize temporal filters for expressions

There is a dependency with this middleware and mongo. Without
optimization mongo cannot compare the bucketed timestamps because
AFAICT mongo 4 doesn't have date truncation so we do so in clojure for
the compared literal but cannot do the lhs field/expression.
…38548)

* Avoid unnecessary re-renderings in DashboardSharingEmbeddingModal

* Add deep equal selector

* drop underscore
* load analytics only when changed using a checksum

- over audit deserialization files

* update docstrings

* fix testing wording
* refactor: prepare SettingsPage to have conditionally rendered steps (#38201)

* refactor: prepare SettingsPage to have conditionally rendered steps

* fix tests missing props

* Usage reason question (#38267)

* Invactive -> Inactive

* add question

* fix e2e test

* small refactor

* Update frontend/src/metabase/setup/components/UsageQuestionStep/UsageQuestionStep.tsx

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* Hide "Add your data" step for people interested in embedding (#38390)

* hide 'Add your data' step when user is interested in embedding

* add other test cases

* refactor: create selector

* address pr feedback

* adds minimal embed focused homepage (#38402)

* very minimal homepage

* fixed text color

* minimal e2e + actual logic that i forgot lol

* refactor the list to not have the numbers in the content

* rename util functions

* use button to have cursor when hovering + accessibility

* refactor: move the waitFor inside the submit step

* fix: make sure state is clean on multiple installs in a row

* test: check that the homepage persists reload + removed typos

* rename s to state

* moved util functions up to home/utils.ts

* adds key to avoid react warning

* refactor and tests for [meet embedders] (#38465)

* test: check all numbered steps during the setup flow

* refactor: introduce getSteps and start using the step name instead of a number to identify steps

* refactor: remove map of the steps, use step names directly

* refactor: getNextStep

* include 'hidden' steps in getSteps so that it won't mess up with analytics

* fix after rebase issue

* use full name instead of s, s -> step

* analytics for meet-embedders (#38521)

* refactor: extract schema version and onboarding version into constants

* remove old ga events

* trackUsageReasonSelected

* update trackStepSeen to send the correct index

* copy old schema for better diff

* adds new snowplow event for usage_reason step

* schema and e2e update for usage_reason_selected

* adds utm tag to the link in the minimal embed homepage

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
Co-authored-by: Luiz Arakaki <luiz.arakaki@metabase.com>
* Don't reload dashcards in edit mode

* Update and unskip repro

* Extend "duplicate tab" e2e test

* Fix implicit request body schema when fetching dashcard data

* Disable dashcard data refetching in edit mode

* Revert `Dashboard` useEffect changes

* Fix tests
* Migration adding 'width' to Dashboards

3 migrations:
 - 1st adding the width column with default value of 'fixed'
 - 2nd updating all existing dashboards to have width 'full', which corresponds to what the current behaviour is (will
 be the 'old' behaviour after the fixed-width project lands).
   - The rolloback here is necessary but we don't care what happens as the column will be dropped immediately in the
   next rollback anyway
 - 3rd sets the notNullableConstraint. DefaultNull is 'full' here, just in case there's an existing dashboard whose
 width value is not yet set from the 1st migration. Don't know how that could happen, but its here in case

* Dashboard PUT api endpoint accepts width changes and updates appdb

update-dashboard function now is aware of the :width key so those changes can end up in the transaction.

Also added a width test that asserts that the value's default is "fixed", it can be changed, eg. to "full", but cannot
be changed to other values.

* Add width to revision tests

* Fix dashboard revision tests.

:width key is now needed in some revision tests. As well we need a string communicating that the :width setting has
changed from 'full' to 'fixed' or vice-versa.

* Fix comments/remarks in migration to be accurate

* Attempt to fix default not working mysql/mariadb

* Set default in dashboard model

Signed-off-by: Adam James <adam.vermeer2@gmail.com>

* Revert default :width 'fixed' value.

* Explicitly add default value 'fixed' for MySQL/MariaDB

* dashboard fixed width FE implementation

* adjust popover shadow styling as the popover was blending in with the header

* adjust extra button popover offset

* add E2E to validate behavior

* add fixed width container to public dashboards

* fix public embedding not respecting dashboard width setting

* add test for public dashboards

* Fix embed test failures

* add fixed width to x-ray dashboards

* reduce code duplication

* move FixedWidthContainer into DashboardGridConnected

- We get the fixed-width w/o code duplication across AutomaticDashboardApp, PublicDashboard, and Dashboard

* update E2E tests to reflect actual intended behavior

* fix type errors

* tweak default width of cards to accomodate fixed width

* adjust tooltip button after merging changes from master

* fix bar chart test failure

* fix dashboard filters date test failure

- new ellipsis button in dashboard edit mode broke the test

* adjust test for new fixed width dashboards

* adjust test for new fixed width dashboards

* adjust test for new fixed width dashboards

* bump funnel default width

* adjust test for new fixed width dashboards

* Fix double overlay for LineAreaBarChart dash-cards

- No longer has an overlay that persists from editing mode to  viewing mode
- Adjust click-behavior tests to account for new grid-width. Old test relied on a dashcard being taller than they will now default to being. i.e. Move the chosen point/row to down an index.

* Merge FixedWidthContainer with dashboard grid div

* supress brush events while editing timeseries line charts on dashboard

* fix failing test

- test failed because I did not update this assertion based on previous changes

* fix broken link input in editing mode

* fix pointer events issue on text cards in edit mode

* update tests for new dash-card default sizes

* update tabs card moving test because of new default card sizes

---------

Signed-off-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
There are cases where the ref as provided is not the same as what a
fresh `(lib.ref/ref column)` would give. This seems mostly to affect
models, where the metadata leaks some of the underlying details like
joins.

Fixes #38034.
Co-authored-by: Callum Herries <calherries@gmail.com>
* Use greater than to assert timeout has elapsed

* Use fake timers to test delay group
@npretto npretto requested a review from camsaul as a code owner February 9, 2024 14:28
@metabase-bot metabase-bot bot added .Team/Embedding visual Run Percy visual testing labels Feb 9, 2024
Copy link

github-actions bot commented Feb 9, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff 3bd4551...8ec2aa3.

Notify File(s)
@alxnddr frontend/src/metabase/visualizations/register.js
frontend/src/metabase/visualizations/shared/utils/sizes.ts
frontend/src/metabase/visualizations/visualizations/DashCardPlaceholder.tsx
@kdoh frontend/src/metabase/ui/components/icons/Icon/icons/index.ts
frontend/src/metabase/ui/components/icons/Icon/icons/section.svg
frontend/src/metabase/ui/components/utils/DelayGroup/DelayGroup.unit.spec.tsx
@ranquild frontend/src/metabase/home/components/EmbedMinimalHomepage/EmbedMinimalHomepage.styled.tsx
frontend/src/metabase/home/components/EmbedMinimalHomepage/EmbedMinimalHomepage.tsx
frontend/src/metabase/home/components/EmbedMinimalHomepage/index.ts
frontend/src/metabase/home/components/HomeContent/HomeContent.tsx
frontend/src/metabase/home/utils.ts
frontend/src/metabase/setup/actions.ts
frontend/src/metabase/setup/analytics.ts
frontend/src/metabase/setup/components/ActiveStep/ActiveStep.tsx
frontend/src/metabase/setup/components/CloudMigrationHelp/CloudMigrationHelp.tsx
frontend/src/metabase/setup/components/CompletedStep/CompletedStep.tsx
frontend/src/metabase/setup/components/CompletedStep/CompletedStep.unit.spec.tsx
frontend/src/metabase/setup/components/DatabaseHelp/DatabaseHelp.tsx
frontend/src/metabase/setup/components/DatabaseStep/DatabaseStep.tsx
frontend/src/metabase/setup/components/DatabaseStep/DatabaseStep.unit.spec.tsx
frontend/src/metabase/setup/components/InactiveStep/InactiveStep.styled.tsx
frontend/src/metabase/setup/components/InactiveStep/InactiveStep.tsx
frontend/src/metabase/setup/components/InactiveStep/index.ts
frontend/src/metabase/setup/components/LanguageStep/LanguageStep.tsx
frontend/src/metabase/setup/components/LanguageStep/LanguageStep.unit.spec.tsx
frontend/src/metabase/setup/components/PreferencesStep/PreferencesStep.tsx
frontend/src/metabase/setup/components/PreferencesStep/PreferencesStep.unit.spec.tsx
frontend/src/metabase/setup/components/SettingsPage/SettingsPage.tsx
frontend/src/metabase/setup/components/Setup/Setup.tsx
frontend/src/metabase/setup/components/UsageQuestionStep/UsageQuestionStep.tsx
frontend/src/metabase/setup/components/UsageQuestionStep/index.ts
frontend/src/metabase/setup/components/UserStep/UserStep.tsx
frontend/src/metabase/setup/components/UserStep/UserStep.unit.spec.tsx
frontend/src/metabase/setup/components/WelcomePage/WelcomePage.tsx
frontend/src/metabase/setup/components/types.ts
frontend/src/metabase/setup/constants.ts
frontend/src/metabase/setup/reducers.ts
frontend/src/metabase/setup/selectors.ts
frontend/src/metabase/setup/setup.unit.spec.tsx
frontend/src/metabase/setup/types.ts

Copy link

replay-io bot commented Feb 9, 2024

Status Complete ↗︎
Commit 8ec2aa3
Results
⚠️ 2 Flaky
2298 Passed

@npretto npretto changed the title Wip merge master 35961 m6/add snowplow events merge master into snowplow branch Feb 9, 2024
@npretto npretto merged commit c9e8cee into 35961-m6/add-snowplow-events Feb 9, 2024
107 of 108 checks passed
@npretto npretto deleted the WIP-merge-master-35961-m6/add-snowplow-events branch February 9, 2024 15:54
@npretto npretto restored the WIP-merge-master-35961-m6/add-snowplow-events branch February 9, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Team/Embedding visual Run Percy visual testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet