deminearchiver
Explore posts from serversNeed help debugging animations
I had a brilliant idea for implementing an animated responsive tab bar component, but I need help debugging animations.
Explanation
The idea is as follows: instead of making the indicator reside in the tab bar element, move it inside the currently active tab. This way if the tab changes its width the indicator will resize as well. To animate it, we need to calculate offsets (
left
and right
) of the previous tab relative to the current tab. If there are multiple ongoing animations we need to readjust each single one (create a new animation relative to the current tab and set its currentTime
to the time of the animation we are adjusting).
The problem
If I have 2 simulatenous animations, everything works as expected, but with 3 or more the indicator starts shifting. (see attachment)
I'm not that good at doing maths in coordinate space, so I must have miscalculated something. I hope someone can point me in the right direction.
Minimal, reproducible example
To observe the problem, quickly click through 3 or more different tabs (the animation will break)
Here's the link to a MRE (heavily simplified):
https://codesandbox.io/p/devbox/tab-bar-36kj3633 replies
Cannot build for Vercel
For context
So far I'm not satisfied with Solid Start because I wasn't able to deploy the app at least anywhere (I tried Vercel, Netlify and Cloudflare). But Vercel is my main target so this question is about deploying to Vercel specifically.
Also I haven't really seen anyone to have the same problem as I do.
How to reproduce
1. Create a new Solid Start project
2. Choose any template (I chose
hackernews
)
3. Edit your app.config.ts
as follows:
4. Run npm run build
Error
55 replies
Per-route CSS when using FileRoutes
If I want to have a CSS file for an individual route (i.e. that route has unique page flow compared to others), where should I put the CSS file? It seems incredibly inconvenient to have CSS files in a separate folder.
11 replies
DIAdiscord.js - Imagine an app
•Created by deminearchiver on 1/20/2023 in #djs-questions
2+ Clients = API spam?
If I have 2 or more clients on a single IP, will this be considered API spam even though each client has a different token?
6 replies
DIAdiscord.js - Imagine an app
•Created by deminearchiver on 10/30/2022 in #djs-questions
Creating multiple instances of Client
Is it possible for multiple Clients (different tokens) to run concurrently? Considee the following simple example:
6 replies
DIAdiscord.js - Imagine an app
•Created by deminearchiver on 8/5/2022 in #djs-questions
Reply to interaction with custom avatar webhook
Is it possible to send an Interaction reply with a custom
avatarURL
? If it is, how to do it?5 replies
DIAdiscord.js - Imagine an app
•Created by deminearchiver on 7/15/2022 in #djs-questions
Remove Emoji from a Button?
How to remove an emoji from a button using the
ButtonBuilder.setEmoji()
method? I tried to put null
and undefined
into the arguments, but neither worked.9 replies
DIAdiscord.js - Imagine an app
•Created by deminearchiver on 7/14/2022 in #djs-questions
Update interaction on Modal Submit
I can't call
interaction.update()
after I received a ModalSubmitInteraction
.
After I send a command, the bot replies with a button. After clicking the button, I call ButtonInteraction.showModal()
. I want to call ButtonInteraction.update()
upon modal submit, but there seems to be no proper way to do it (I am trying to change text on the button received from the modal submit).
Are there any workarounds for this?22 replies