151
3
152
3
submitted 10 months ago by cm0002@lemdro.id to c/javascript@programming.dev
153
2
submitted 10 months ago by cm0002@lemdro.id to c/javascript@programming.dev
154
6
155
4
156
6
Announcing Vite+ (voidzero.dev)
157
12
158
3
Birth of Prettier (blog.vjeux.com)
159
0
160
7
161
9
submitted 11 months ago by lena@gregtech.eu to c/javascript@programming.dev
162
40
163
9

In Lemmy, we've removed the TopSixHours / TopXTime in favor of a more fine grained time_range_seconds field. You can see it in action in this PR

The problem is, we need a good UI picker for a time interval: IE things like 5 seconds, 4 days, 7 months, etc.

I've found a million libraries for specific date and time pickers, but not a single one for time intervals.

Does anyone know of any?

Thanks in advance.

164
3

if you've ever tried it, that is.

I'm considering giving it a go

165
2
166
6
submitted 1 year ago* (last edited 1 year ago) by SpiderUnderUrBed@lemmy.zip to c/javascript@programming.dev

Is there any js module for lazy-loading a files content? in vanilla js, (that a import via a script tag), so that if i scroll enough, it will send a request to the server for more of a files content, at a specific chunk of it, and the browser will add the rest of the content to the file viewer/editor

I am making a filebrowser, and so far i implemented navigating folders, uploading files, next I would like to make a file editor, so its not the html page itself I want lazy-loaded, I want a file to be lazy-loaded into the editor, again, so you scroll enough, and it will fetch the chunks from the server (i can figure out the backend bit, I would like it if it worked with multexjs or multipart in rust and I dont have to manually sort out file chunking but thats not a hard requirement.)

Alternative to modules would just be code i can use

167
1
168
7
169
0
170
0

Decentralized Architecture: https://positive-intentions.com/blog/decentralised-architecture

While my approach here could be considered overly complicated (because, well, it is), I'm trying something new, and it's entirely possible this strategy won't be viable long-term. My philosophy is "there's only one way to find out." I'm not necessarily recommending this approach, just sharing my journey and what I'm doing.

Potential Benefits

I've identified some interesting benefits to this approach:

While I often see module federation and microfrontends discouraged in online discussions, I believe they're a good fit for my specific approach. I'm optimistic about the benefits and wanted to share the details.

When serving the federated modules, I can also host the Storybook statics. I think this could be an excellent way to document the modules in isolation.

Modules and Applications

Here are some examples of the modules and how they're being used:

This setup allows me to create microfrontends that consume these modules, enabling me to share functionality between different applications. The following applications, which have distinct codebases (and a distinction between open and closed source), would be able to leverage this:

Sharing these dependencies should make it easier to roll out updates to core mechanics across these diverse applications.

Furthermore, this functionality also works when I create an Android build with Tauri. This could streamline the process of creating new applications that utilize these established modules.

Considerations and Future

I'm sure there will be some distinct testing and maintenance overhead with this architecture. However, depending on how it's implemented, I believe it could work and make it easier to improve upon the current functionality.

It's important to note that everything about this project is far from finished. Some might view this as an overly complicated way to achieve what npm already does. However, I think this approach offers greater flexibility by allowing for the separation of open and closed-source code for the web. Of course, being JavaScript, the "source code" will always be accessible, especially in the age of AI where reverse-engineering is more possible than ever before.

171
4

Watched this a while back throughout enjoyed it and thought i might share this here.

172
8
173
8
Biome v2.1 released (biomejs.dev)
174
3
Promise-based pipe in JS (blog.kaki87.net)
submitted 1 year ago* (last edited 11 months ago) by KaKi87@jlai.lu to c/javascript@programming.dev
175
14
view more: ‹ prev next ›

JavaScript

2786 readers
1 users here now

founded 3 years ago
MODERATORS