Skip to content

Move hand raise lead routes definition to the backend

What does this MR do and why?

Currently hand raise lead route is hardcoded in the js file.

Rails provides this route definition via routing file defined here.

Hardcoding it in the js files can lead to confusion and upkeep that could be avoided if we used the SSOT that has been provided by rails via definition of the route in the routing file.

How to set up and validate locally

Screenshot_2023-08-10_at_19.21.36
  • Open network tab in browser console.
  • Create new group. Visit Settings -> Billing.
  • Click Talk to an expert today. Submit contact sales form.
  • Make sure there is request to /-/subscriptions/hand_raise_leads:
Screenshot_2023-08-10_at_19.17.50
  • Start new trial for that group. Locally can be achieved via:
bin/rails c

GitlabSubscription.find_or_create_by(namespace_id: Group.last).update(trial_starts_on: Date.yesterday, trial: true, trial_ends_on: 1.year.from_now, hosted_plan: Plan.find_by(name: 'ultimate_trial'))
  • Reload page. Click Contact sales. Submit contact sales form.
  • Make sure there is request to /-/subscriptions/hand_raise_leads.
  • Click trial widget -> Contact sales. Submit contact sales form:
Screenshot_2023-08-10_at_19.27.57
  • Make sure there is request to /-/subscriptions/hand_raise_leads.
  • Switch to old navigation.
  • Click trial widget -> Contact sales. Submit contact sales form:
  • Make sure there is request to /-/subscriptions/hand_raise_leads.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #416386 (closed)

Edited by Serhii Yarynovskyi

Merge request reports