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

feat: Add a link to each service's analytics page in the editor #2387

Merged
merged 9 commits into from
Nov 9, 2023

Conversation

Mike-Heneghan
Copy link
Contributor

@Mike-Heneghan Mike-Heneghan commented Nov 6, 2023

What

  • Add a new column analytics_link to the flow table to store the link to analytics for each flow
  • Add this property to the shared store.
  • Conditionally render a button in the flow editor for the analytics_link to open the page in a new tab

Why

  • Service editors sometimes find it can be hard to find the links to the analytics pages
  • This new button should hopefully make it more convenient to get to the appropriate analytics page

Screen Recording

Screen.Recording.2023-11-06.at.17.28.29.mov

Follow Up

@Mike-Heneghan Mike-Heneghan force-pushed the mh/analytics-link-to-analytics-in-editor branch from 0479b44 to cba3f5f Compare November 6, 2023 17:17
Copy link

github-actions bot commented Nov 6, 2023

🤖 Hasura Change Summary compared a subset of table metadata including permissions:

Updated Tables (1)

  • public.flows permissions:

    insert select update delete
    platformAdmin /
    teamEditor /
    2 added column permissions
    insert select update
    platformAdmin ➕ analytics_link
    teamEditor

@Mike-Heneghan Mike-Heneghan self-assigned this Nov 6, 2023
@Mike-Heneghan
Copy link
Contributor Author

@Mike-Heneghan Mike-Heneghan changed the title Mh/analytics link to analytics in editor feat: Add a link to each service's analytics page in the editor Nov 6, 2023
@Mike-Heneghan Mike-Heneghan requested a review from a team November 6, 2023 17:36
@Mike-Heneghan Mike-Heneghan marked this pull request as ready for review November 6, 2023 17:36
Copy link

github-actions bot commented Nov 6, 2023

Removed vultr server and associated DNS entries

editor.planx.uk/src/pages/FlowEditor/lib/store/shared.ts Outdated Show resolved Hide resolved
editor.planx.uk/src/routes/flow.tsx Outdated Show resolved Hide resolved
hasura.planx.uk/metadata/tables.yaml Outdated Show resolved Hide resolved
Mike-Heneghan added a commit that referenced this pull request Nov 7, 2023
- As per: #2387 (comment)
- Update the flowMetabaseLink to handle the query returning null
Mike-Heneghan added a commit that referenced this pull request Nov 7, 2023
…navailable

- As per: #2387 (comment)
- Move the analytics link to be the middle option to maintain groupings
- As per: #2387 (comment)
- Render a disable version of the analytics page link to covney active/inactive to improve usability
Mike-Heneghan added a commit that referenced this pull request Nov 7, 2023
- As per: #2387 (comment)
- Best practice not to tie the variable name to a single provider
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and all working as expected for me! I successfully added a (fake) analytics_link to this flow.

One minor comment about migration history, but not a particularly big deal to skip if you're ready to get this merged.

- Add analytcis link via bar chart icon
- Only renders if the flow has a metabase link associated in the db
- As per: #2387 (comment)
- Update the flowMetabaseLink to handle the query returning null
… and flowMetabaseLink

- Consistently use the pattern of directly settings state attributes
…navailable

- As per: #2387 (comment)
- Move the analytics link to be the middle option to maintain groupings
- As per: #2387 (comment)
- Render a disable version of the analytics page link to covney active/inactive to improve usability
- As per: #2387 (comment)
- Best practice not to tie the variable name to a single provider
- As the name of the new column changed there was a create and a rename migration
- Removed both of these and added a new migration which names the column correctly from the get go
@Mike-Heneghan Mike-Heneghan force-pushed the mh/analytics-link-to-analytics-in-editor branch from b4e3f1d to 4ed6592 Compare November 8, 2023 14:37
@Mike-Heneghan
Copy link
Contributor Author

Pizza

Deployed d5e56ac to https://2387.planx.pizza.

Useful links:

All seems good on this Pizza testing with this flow: https://2387.planx.pizza/testing/mikes-analytics-testing

@Mike-Heneghan Mike-Heneghan merged commit f44bcbb into main Nov 9, 2023
12 checks passed
@Mike-Heneghan Mike-Heneghan deleted the mh/analytics-link-to-analytics-in-editor branch November 9, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants