Add Whats New section to DuoProDiscover page ...
What does this MR do and why?
Add Whats New section to DuoProDiscover page
- Introduces a new section highlighting recent GitLab Duo Chat features
- Implements render_duo_chat responsive card layout for mobile and desktop views
- Adds tracking for documentation links within each feature card
- Creates helper methods for generating feature cards content
- Expands test coverage with new RSpec examples for the section
These changes enhance the Duo Pro trial discover page by showcasing the latest GitLab Duo Chat capabilities, encouraging user engagement with new features.
Changelog: added EE: true
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Make Duo Pro Discover show page available by following the steps in @jmontal's initial MR. Re-posting rails console commands for clarity / ease here:
bin/rails c
Feature.enable(:duo_pro_trials)
GitlabSubscriptions::AddOn.find_or_create_by(name: 'code_suggestions', description: GitlabSubscriptions::AddOn.descriptions[:code_suggestions])
GitlabSubscription.last.update(trial: true, trial_starts_on: 45.days.ago, trial_ends_on: 15.days.ago)
GitlabSubscriptions::AddOnPurchase.create(subscription_add_on_id: GitlabSubscriptions::AddOn.find_by(name: 'code_suggestions').id, namespace: Group.last, started_at: 60.days.ago, expires_on: Date.today, trial: true, quantity: 1, purchase_xid: '1')
- Caveats / Troubleshooting - depending on your current local environment you may need to create additional resources for those rails console commands to execute successfully (I believe I needed to create a GitlabSubscription in the console as well.)
If you're impatient and those steps don't fully get you there, you should also be able to force the rendering of the Duo Pro Discover page by modifying the following file like so - although be careful not to commit it.
ee/app/models/gitlab_subscriptions/trials/duo_pro.rb
def self.show_duo_pro_discover?(namespace, user)
+ return true
return false unless namespace.present?
return false unless user.present?
- Start the GDK and navigate to http://localhost:3000/groups/#{your-test-group}/-/add_ons/discover_duo_pro
Related to #462652