Skip to content

Commit

Permalink
Maintenance project Q3 (#2800)
Browse files Browse the repository at this point in the history
* bsfy 281 skip button for first plan (#2796)

* added skip activation button

* lintfix

* env/requests/repo tooltips (#2797)

* fix rubocop
  • Loading branch information
murtaza-swati authored Apr 9, 2024
1 parent 0ccf6d1 commit ee53906
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 6 deletions.
4 changes: 0 additions & 4 deletions app/components/billing/authorization.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export default Component.extend({
return this.isSubscribed && this.hasSubscriptionPermissions && !this.freeV2Plan && !this.isTrial && !this.cancellationRequested;
}),

hasSubscriptionPermissions: computed('account.hasSubscriptionPermissions', 'account.permissions', function () {
return this.account.hasSubscriptionPermissions && (!this.account.isOrganization || this.account.permissions.plan_create);
}),

hasSubscriptionPermissions: computed('account.hasSubscriptionPermissions', 'account.permissions', function () {
return this.account.hasSubscriptionPermissions && (!this.account.isOrganization || this.account.permissions.plan_create);
}),
Expand Down
12 changes: 12 additions & 0 deletions app/components/billing/first-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ export default Component.extend({
}
}).drop(),


skipSubscription() {
this.storage.clearBillingData();
this.storage.clearSelectedPlanId();
this.storage.wizardStep = 2;
this.wizard.update.perform(2);
this.router.transitionTo('account.repositories');
},

newV2Subscription() {
const plan = this.store.createRecord('v2-plan-config');
const billingInfo = this.store.createRecord('v2-billing-info');
Expand Down Expand Up @@ -280,6 +289,9 @@ export default Component.extend({
this.createSubscription.perform();
}
},
skipActivation() {
this.skipSubscription();
},
changeCountry(country) {
this.set('country', country);
this.hasLocalRegistration = false;
Expand Down
12 changes: 12 additions & 0 deletions app/styles/app/layouts/activation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@
margin-bottom: 44px;
}

#first-plan-skip {
margin-top: 60px;
margin-bottom: 10px;
}
#first-plan-skip-button {
margin-right: -140px;
padding-left: 110px;
font-size: 14px;
font-weight: 600;
color: $ansi-green;
}

.not-required-form-elem {
width: 100%;
margin-bottom: 10px;
Expand Down
9 changes: 9 additions & 0 deletions app/styles/app/layouts/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -498,3 +498,12 @@ $env-var-value-background: lighten($cement-grey, 20);
margin-left: 20px;
}
}

.ember-tooltip {
min-width: 200px;
max-width: 1316px;

.tooltip-inner {
}

}
10 changes: 10 additions & 0 deletions app/templates/components/billing/first-plan.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,15 @@

</div>

<div class='mt-5 float-right' id="first-plan-skip">
{{#unless this.isLoading}}
<button id="first-plan-skip-button" class="no-button" {{action 'skipActivation' }}
data-test-skip-payment='true'>
skip
</button>
{{/unless}}
</div>


</TravisForm>
{{/if}}
3 changes: 2 additions & 1 deletion app/templates/components/env-var.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div class="env-var-name">
<EmberTooltip @text={{this.envVar.name}} @targetId='env-var-name-{{envVar.id}}' @popperContainer='body'/>
<div class="env-var-name" id='env-var-name-{{envVar.id}}'>
{{this.envVar.name}}
</div>
<div class="env-var-value">
Expand Down
1 change: 1 addition & 0 deletions app/templates/components/owner-repo-tile.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
@route="repo"
@models={{array this.repo.provider this.repo.urlOwnerName this.repo.urlName}}
@query={{hash serverType=this.repo.serverType}}
@title={{this.repo.name}}
class="label-align"
>
<span class="repo-title-text">
Expand Down
5 changes: 4 additions & 1 deletion app/templates/components/requests-item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
</span>
</div>
<div class="row-item fade-out" data-requests-item-commit-message>
{{{format-message this.request.commit.message short="true" repo=this.build.repo}}}
<span id='requests-item-{{request.id}}-commit-message'>
<EmberTooltip @text={{this.request.commit.message}} @targetId='requests-item-{{request.id}}-commit-message' @popperContainer='body'/>
{{{format-message this.request.commit.message short="true" repo=this.build.repo}}}
</span>
</div>
<div class="row-item" data-requests-item-build>
{{#if this.build}}
Expand Down

0 comments on commit ee53906

Please sign in to comment.