Skip to content

Team plan CTAs#25073

Merged
mcbattirola merged 51 commits intomasterfrom
mcbattirola/team-features-CTAs
May 2, 2023
Merged

Team plan CTAs#25073
mcbattirola merged 51 commits intomasterfrom
mcbattirola/team-features-CTAs

Conversation

@mcbattirola
Copy link
Copy Markdown
Contributor

@mcbattirola mcbattirola commented Apr 24, 2023

This PR adds CTAs for the usage-based billing plan.

Designs can be found here. Note that some of the designs are implemented in this teleport.e pr: https://github.com/gravitational/teleport.e/pull/1200.

Note that the CTAs are hidden behind a flag set by ctaService. Currently, this service is never updated, so CTAs shouldn't be visible currently. In the future, this will be updated at the app start time based on the cluster features.

I also added a flag to the config isUsageBasedBilling. This will always be false for now. In a future PR, when I update this code to actually set the CTA flags, this value will be used. This is used for now on https://github.com/gravitational/teleport.e/pull/1200 to show/hide the usage-based specific access requests page.

You can update web/packages/teleport/src/services/cta/cta.ts and set all fields to true to test this (or see the storybook components).

Screenshot from 2023-04-24 15-01-34

Screenshot from 2023-04-24 15-02-16

Part of https://github.com/gravitational/cloud/issues/4119

Edit: there was some overlapping between the CTA of active sessions in this PR and the work done on #24961. I'll wait for it to be merged and go back to this.

@mcbattirola mcbattirola marked this pull request as ready for review April 24, 2023 17:57
@mcbattirola
Copy link
Copy Markdown
Contributor Author

Update: I have synced this with master. Now my changes to the join button component is way smaller :)

Comment thread web/packages/teleport/src/Support/Support.story.tsx Outdated
Comment thread web/packages/teleport/src/Sessions/SessionList/SessionJoinBtn.tsx Outdated
Comment thread web/packages/teleport/src/Sessions/SessionList/SessionJoinBtn.tsx Outdated
Copy link
Copy Markdown
Contributor

@avatus avatus left a comment

Choose a reason for hiding this comment

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

Thank you for adding default params on these optional props. LGTM

Copy link
Copy Markdown
Member

@ryanclark ryanclark left a comment

Choose a reason for hiding this comment

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

LGTM!

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from rudream May 2, 2023 13:34
@mcbattirola mcbattirola added this pull request to the merge queue May 2, 2023
Merged via the queue into master with commit e082318 May 2, 2023
@mcbattirola mcbattirola deleted the mcbattirola/team-features-CTAs branch May 2, 2023 14:19
@public-teleport-github-review-bot
Copy link
Copy Markdown

@mcbattirola See the table below for backport results.

Branch Result
branch/v12 Failed
branch/v13 Failed

mcbattirola added a commit that referenced this pull request May 3, 2023
* (wip) add unlock feature button to support page

* Fix typo

* (wip) add locked feature join session

* Improve session join style

* Add session join lock button

* Remove hover on locked join menu

* Update copy

* Only show `join as...` when appropriate

* (wip)

* Make ButtonLockedFeature theme sensitive

* Remove debug stuff

* Adjust feature button height

* Fix session join button on locked

* Remove unused import

* typo

* Add link to cta button

* Remove teams flag

* Add cta service

* Update snapshots

* Lock button style

* Add cta to context

* Rename cta to ctaService

* Stories and tests

* Add comments clarifying that ctas are not used currently

* add showActiveSessionsCTA to useSessions

* Licenses

* Lint license

* Remove commented out code

* Add missing types

* Replace cta service for an object with cta on context

* Fix menu hack

* small refactor in styled stuff

* Update SessionJoinBtn to use master code

* Snapshot update

* Minor stuff
mcbattirola added a commit that referenced this pull request May 3, 2023
* Team plan CTAs (#25073)

* (wip) add unlock feature button to support page

* Fix typo

* (wip) add locked feature join session

* Improve session join style

* Add session join lock button

* Remove hover on locked join menu

* Update copy

* Only show `join as...` when appropriate

* (wip)

* Make ButtonLockedFeature theme sensitive

* Remove debug stuff

* Adjust feature button height

* Fix session join button on locked

* Remove unused import

* typo

* Add link to cta button

* Remove teams flag

* Add cta service

* Update snapshots

* Lock button style

* Add cta to context

* Rename cta to ctaService

* Stories and tests

* Add comments clarifying that ctas are not used currently

* add showActiveSessionsCTA to useSessions

* Licenses

* Lint license

* Remove commented out code

* Add missing types

* Replace cta service for an object with cta on context

* Fix menu hack

* small refactor in styled stuff

* Update SessionJoinBtn to use master code

* Snapshot update

* Minor stuff

* Fix style messed on cherry-picking
@public-teleport-github-review-bot
Copy link
Copy Markdown

@mcbattirola See the table below for backport results.

Branch Result
branch/v12 Failed
branch/v13 Failed

mcbattirola added a commit that referenced this pull request May 5, 2023
* (wip) add unlock feature button to support page

* Fix typo

* (wip) add locked feature join session

* Improve session join style

* Add session join lock button

* Remove hover on locked join menu

* Update copy

* Only show `join as...` when appropriate

* (wip)

* Make ButtonLockedFeature theme sensitive

* Remove debug stuff

* Adjust feature button height

* Fix session join button on locked

* Remove unused import

* typo

* Add link to cta button

* Remove teams flag

* Add cta service

* Update snapshots

* Lock button style

* Add cta to context

* Rename cta to ctaService

* Stories and tests

* Add comments clarifying that ctas are not used currently

* add showActiveSessionsCTA to useSessions

* Licenses

* Lint license

* Remove commented out code

* Add missing types

* Replace cta service for an object with cta on context

* Fix menu hack

* small refactor in styled stuff

* Update SessionJoinBtn to use master code

* Snapshot update

* Minor stuff
mcbattirola added a commit that referenced this pull request May 9, 2023
* Team plan CTAs (#25073)

* (wip) add unlock feature button to support page

* Fix typo

* (wip) add locked feature join session

* Improve session join style

* Add session join lock button

* Remove hover on locked join menu

* Update copy

* Only show `join as...` when appropriate

* (wip)

* Make ButtonLockedFeature theme sensitive

* Remove debug stuff

* Adjust feature button height

* Fix session join button on locked

* Remove unused import

* typo

* Add link to cta button

* Remove teams flag

* Add cta service

* Update snapshots

* Lock button style

* Add cta to context

* Rename cta to ctaService

* Stories and tests

* Add comments clarifying that ctas are not used currently

* add showActiveSessionsCTA to useSessions

* Licenses

* Lint license

* Remove commented out code

* Add missing types

* Replace cta service for an object with cta on context

* Fix menu hack

* small refactor in styled stuff

* Update SessionJoinBtn to use master code

* Snapshot update

* Minor stuff

* update snapshots

* Update snapshots

* Remove duplicated prop
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants