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

Allow configuring of banner for booking demo sessions #3035

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

midigofrank
Copy link
Collaborator

@midigofrank midigofrank commented Mar 17, 2025

Description

This PR makes it possible to book for demo. When the user submits the form, they get a permanent redirect to the configured calendly url

Validation steps

This should be validated from the billing app. For standalone testing, you can enable the banner by changing the config

The banner is persistent across most pages (if not all) with the exception of the workflow edit page.

Notes for the reviewer

LayoutComponents.page_content/1 previously defined a slot named :banner. All pages that needed to show the banner was doing this:

<LayoutComponents.page_content>
  <:banner>
    <%= if assigns[:banner] do %>
      <%= Phoenix.LiveView.TagEngine.component(
        @banner.function,
        @banner.attrs,
        {__ENV__.module, __ENV__.function, __ENV__.file, __ENV__.line}
      ) %>
    <% end %>
  </:banner>
</LayoutComponents.page_content>

This was repetitive, so most of the changes you'll find are those that do this instead:

<LayoutComponents.page_content banner={assigns[:banner]}>
</LayoutComponents.page_content>

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@midigofrank midigofrank self-assigned this Mar 17, 2025
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 96.92308% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.73%. Comparing base (fbf90b7) to head (8329ef4).

Files with missing lines Patch % Lines
lib/lightning/config.ex 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3035      +/-   ##
==========================================
+ Coverage   91.71%   91.73%   +0.02%     
==========================================
  Files         348      349       +1     
  Lines       12956    13013      +57     
==========================================
+ Hits        11882    11937      +55     
- Misses       1074     1076       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@midigofrank midigofrank marked this pull request as ready for review March 18, 2025 06:05
@midigofrank midigofrank requested review from elias-ba and stuartc March 18, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

Successfully merging this pull request may close these issues.

1 participant