Skip to content

POC: Replace foundation joyride with Driver.js#3471

Merged
lunkwill42 merged 4 commits intomasterfrom
poc/3468-replace-foundation-joyride
Aug 29, 2025
Merged

POC: Replace foundation joyride with Driver.js#3471
lunkwill42 merged 4 commits intomasterfrom
poc/3468-replace-foundation-joyride

Conversation

@Simrayz
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz commented Aug 27, 2025

Scope and purpose

Closes #3468. Replaces foundation joyride usages with implementations in Driver.js.

I chose this library because I liked the API, and the library is the smallest I found and without external dependencies.

The old popups were dark with white text, while the defaults in Driver.js is white with dark text. In my opinion, this works better when the rest of the app is light, and I therefore opted to not implement the same styles as the existing Joyride.

Add a description of what this PR does and why it is needed. If a linked ticket(s) fully
cover it, you can omit this.

POC because it is a new library, and others might disagree with the choice or want alternatives.

Screenshots

Before

Getting Started
image

Add Netbox
image

After

Getting Started
image

Add Netbox
image

This pull request

  • Adds a new js lib, driver.js and css stylesheet
  • Replaces joyride usages in Getting Started navlet and Add Netbox in SeedDB tool

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • This pull request is based on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

@Simrayz Simrayz self-assigned this Aug 27, 2025
@Simrayz Simrayz changed the title Poc: Replace foundation joyride with driver.js POC: Replace foundation joyride with Driver.js Aug 27, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 27, 2025

Test results

   12 files     12 suites   12m 9s ⏱️
2 366 tests 2 366 ✅ 0 💤 0 ❌
6 633 runs  6 633 ✅ 0 💤 0 ❌

Results for commit 9f34f44.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.04%. Comparing base (b1ccdd3) to head (9f34f44).
⚠️ Report is 394 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3471      +/-   ##
==========================================
+ Coverage   61.02%   61.04%   +0.02%     
==========================================
  Files         610      610              
  Lines       44707    44708       +1     
  Branches       43       43              
==========================================
+ Hits        27282    27294      +12     
+ Misses      17415    17404      -11     
  Partials       10       10              

☔ 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.

<div class="row">
{% if request.account.is_admin %}
<div class="column medium-6">
<a id="joyrideme" href="javascript:void(0);"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Never was a fan of "javascript:void(0);", w00t!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah... why not just use the element instead 🤯

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I hope we don't use all of these. Is there a way to shorten this list, remove the ones we definitely don't use? Makes the task less daunting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I hope we can remove as many as possible as we replace some of the js-enabled foundation components. It's going to be super fun and barely an inconvenience, I'm sure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No doubt some are dependent on each other...

@Simrayz Simrayz force-pushed the poc/3468-replace-foundation-joyride branch 2 times, most recently from 8e5063f to c499097 Compare August 27, 2025 11:34
@hmpf
Copy link
Copy Markdown
Contributor

hmpf commented Aug 27, 2025

Thanks for the screen shots.

NAV is old-fashionedly, extremely, square, while Driver.js is subtly curved all over. These helper-wizards are so separate from the rest of the UI that that might be ok but I'd like @lunkwill42's opinion on the looks.

Another change is that the actual text is moved from templates to static files, from html to js. I think that warrants a note in the docs somewhere. (The real challenge with docs in NAV is knowing where to put stuff and what to call the files, and it is a real challenge =) )

@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Aug 27, 2025

Thanks for the screen shots.

NAV is old-fashionedly, extremely, square, while Driver.js is subtly curved all over. These helper-wizards are so separate from the rest of the UI that that might be ok but I'd like @lunkwill42's opinion on the looks.

Another change is that the actual text is moved from templates to static files, from html to js. I think that warrants a note in the docs somewhere. (The real challenge with docs in NAV is knowing where to put stuff and what to call the files, and it is a real challenge =) )

I've tried adjusting the styles, and extending the existing buttons, with this result (using dark mode, matching the existing Joyride almost exactly):
image

With just changing of border radius and using Nav buttons in light mode, it looks like this:
image

@Simrayz Simrayz force-pushed the poc/3468-replace-foundation-joyride branch from c499097 to c2f396d Compare August 28, 2025 07:43
@Simrayz Simrayz force-pushed the poc/3468-replace-foundation-joyride branch from c2f396d to 1ed8dea Compare August 28, 2025 07:47
Copy link
Copy Markdown
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

I might be forgetting something here, but when trying to test this in my devcontainer I get an empty front page (none of my widgets are shown) and am not able to add the widget for the tour:

image

And in the background I get the following error:
"GET /static/js/driver.js?bust=5.14.1.dev7+g1ed8dea0d HTTP/1.1" 404 1937

@sonarqubecloud
Copy link
Copy Markdown

@Simrayz Simrayz added the discussion Requires developer feedback/discussion before implementation label Aug 29, 2025
@hmpf
Copy link
Copy Markdown
Contributor

hmpf commented Aug 29, 2025

I've tried adjusting the styles, and extending the existing buttons, with this result (using dark mode, matching the existing Joyride almost exactly): image

With just changing of border radius and using Nav buttons in light mode, it looks like this: image

Both of these are better.

They're missing from the styleguide so we should add one there as well.

@hmpf hmpf self-requested a review August 29, 2025 12:45
Copy link
Copy Markdown
Contributor

@hmpf hmpf left a comment

Choose a reason for hiding this comment

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

Let's go with white background, standard NAV buttons (the last screenshot).

@lunkwill42 lunkwill42 merged commit da60cd6 into master Aug 29, 2025
18 checks passed
@lunkwill42 lunkwill42 deleted the poc/3468-replace-foundation-joyride branch August 29, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion Requires developer feedback/discussion before implementation frontend javascript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Foundation Joyride

4 participants