Skip to content

Conversation

@binrysearch
Copy link
Contributor

@binrysearch binrysearch commented Sep 11, 2024

This PR updates the entire library to use Signals and reactive elements as opposed to manually managing the DOM elements. This would help eliminate some of the existing bugs and also make the library much easier to maintain long-term.

Here is the gist of the changes:

  • Refactor the existing Tour and Hints constructs to use Signals & reactive elements instead of manually creating and managing element
  • Embed a TypeScript version of Van.js

@vercel
Copy link

vercel bot commented Sep 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
intro-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 8:55am

@github-actions
Copy link

github-actions bot commented Sep 11, 2024

Size Change: +11.1 kB (+28.1%) 🚨

Total Size: 50.7 kB

Filename Size Change
dist/intro.js 17.1 kB +2.68 kB (+18.56%) ⚠️
dist/intro.module.js 16.5 kB +5.78 kB (+53.69%) 🆘
dist/minified/intro.min.js 17.1 kB +2.68 kB (+18.55%) ⚠️

compressed-size-action

@afshinm
Copy link
Contributor

afshinm commented Sep 11, 2024

Awesome! :) We should optimise the new components to reduce the bundle size. Looks great overall.

this: Hint,
hintElement: HTMLElement,
item: HintItem,
stepId: number
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a backward incompatible change and should be announced.


const root = div(
{
className: "introjs-tour",
Copy link
Contributor

Choose a reason for hiding this comment

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

would be great to colocate the classNames, too

if (step >= this._currentStep) {
if (
this._currentStepSignal.val === undefined ||
step >= this._currentStepSignal.val
Copy link
Contributor

Choose a reason for hiding this comment

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

use this.getCurrentStep()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants