You are browsing as a guest. Sign up (or log in) to start making projects!

Stardance Addons

  • 8 Devlogs
  • 17 Total hours

✦ Make Stardance truly yours with unparalleled customization! ✦

Open comments for this post

3h 36m 59s logged

I’ve finished building the foundation for the add-on system, like the toggle features, and for the first add-on, I added the ability to post Devlogs directly from the project page.

To make this happen, I added a new add-on API function that lets scripts run only when you’re on a path that meets certain criteria. It’s usually tricky to handle this in an SPA, but I found out that Turbo (the Rails framework Stardance uses) fires a turbo:render event on the document during page transitions, and that did the trick! It turned out super smooth, and I’m really happy with how it works :)

I’ve finished building the foundation for the add-on system, like the toggle features, and for the first add-on, I added the ability to post Devlogs directly from the project page.

To make this happen, I added a new add-on API function that lets scripts run only when you’re on a path that meets certain criteria. It’s usually tricky to handle this in an SPA, but I found out that Turbo (the Rails framework Stardance uses) fires a turbo:render event on the document during page transitions, and that did the trick! It turned out super smooth, and I’m really happy with how it works :)

Replying to @Korange

0
2
Open comments for this post

2h 14m 16s logged

I had a really hard time with this, but I finally finished the feature that lets you post devlogs right from the popup. I initially tried using fetch, but it was tough because of Rails’ CSRF protection and Origin verification. So instead, I use the chrome.windows API to open a window for Stardance, then inject a script using the scripting API and content scripts to fill out and submit the form for the user. It’s pretty tricky, but I added a few touches to keep the UX smooth, like making it look like a loading screen in the middle of the popup. For example, to close the window right after posting, I save a specific value to sessionStorage first. Then, the content script checks for that value, sends a postMessage to the popup, and the popup catches it and calls the API to close the window. It makes the whole submission process feel seamless.

I had a really hard time with this, but I finally finished the feature that lets you post devlogs right from the popup. I initially tried using fetch, but it was tough because of Rails’ CSRF protection and Origin verification. So instead, I use the chrome.windows API to open a window for Stardance, then inject a script using the scripting API and content scripts to fill out and submit the form for the user. It’s pretty tricky, but I added a few touches to keep the UX smooth, like making it look like a loading screen in the middle of the popup. For example, to close the window right after posting, I save a specific value to sessionStorage first. Then, the content script checks for that value, sends a postMessage to the popup, and the popup catches it and calls the API to close the window. It makes the whole submission process feel seamless.

Replying to @Korange

0
5
Open comments for this post

4h 14m logged

You can now check out Devlogs from the popup, and I’ve added a post form. I’ve also worked on stuff like skeleton loading and some fine-tuned handling.

But honestly, I just can’t get the Devlog submission to work right. I’ve been struggling with it for hours, but between the specific request requirements and Rails’ CSRF protection, nothing is clicking. I thought of a few tricky workarounds, but even those aren’t doing the trick. Part of the reason I’m posting this Devlog is actually to see if I can figure out the right way to handle these submission requests.

You can now check out Devlogs from the popup, and I’ve added a post form. I’ve also worked on stuff like skeleton loading and some fine-tuned handling.

But honestly, I just can’t get the Devlog submission to work right. I’ve been struggling with it for hours, but between the specific request requirements and Rails’ CSRF protection, nothing is clicking. I thought of a few tricky workarounds, but even those aren’t doing the trick. Part of the reason I’m posting this Devlog is actually to see if I can figure out the right way to handle these submission requests.

Replying to @Korange

0
16
Open comments for this post

1h 47m 17s logged

I’ve recreated the stardance postform experience, attachments included!

I’ve recreated the stardance postform experience, attachments included!

Replying to @Korange

0
7
Open comments for this post

2h 37m 18s logged

Working on popup page. You can post a Devlog immediately without even opening Stardance.

Working on popup page. You can post a Devlog immediately without even opening Stardance.

Replying to @Korange

0
6
Open comments for this post

1h 43m 7s logged

I continued working on the settings page, and also worked on how add-ons are handled in the codebase as well as the interface

I continued working on the settings page, and also worked on how add-ons are handled in the codebase as well as the interface

Replying to @Korange

0
5
Open comments for this post

43m 6s logged

I’m working on the UI for the settings page. There’s no logic yet. Also, I finished a cool-looking logo.

I’m working on the UI for the settings page. There’s no logic yet. Also, I finished a cool-looking logo.

Replying to @Korange

0
22
Open comments for this post

19m 7s logged

Inited an extension using WXT!

(I tried forking an existing one for another site and using Plasmo too, but this is what I’ve settled on for now).

Inited an extension using WXT!

(I tried forking an existing one for another site and using Plasmo too, but this is what I’ve settled on for now).

Replying to @Korange

0
10

Followers

Loading…