0 Followers
0 Following
1 Posts

24yo French web dev

Main fediverse account (Mastodon) : @[email protected]

Make texts fade in and out simultaneously ?

https://sh.itjust.works/post/7764295

Make texts fade in and out simultaneously ? - sh.itjust.works

Hello, I’m able to make texts fade in and out sequentially, like the following : F Fi Fir Firs First irst rst st t S Se Sec Seco Secon Second econd cond ond nd d T Th Thi Thir Third Demo : https://jsfiddle.net/KaKi87/t3jm8yhx/2/ [https://jsfiddle.net/KaKi87/t3jm8yhx/2/] But I’d like to to make these fade in and out simultaneously, like the following : F Fi Fir Firs First S rst Se st Sec t Seco Secon Second T cond Th ond Thi nd Thir d Third How to do that ? Thanks !

Make post contents directly selectable

https://sh.itjust.works/post/4601719

Make post contents directly selectable - sh.itjust.works

Infinity’s maintainer wouldn’t try doing it. Would you ? Thanks

What's the current Matrix chat URL ?

https://sh.itjust.works/post/4016733

What's the current Matrix chat URL ? - sh.itjust.works

I tried the the conversation continues here button but it doesn’t work for me : [https://cdn.discordapp.com/attachments/418482899034177557/1146420844357230702/ezgif-4-e0d228248a.gif] I also tried the community’s sidebar link but it results in timeout. Thanks

Crash from inbox -> comment-> browse all comments

https://sh.itjust.works/post/3269481

Crash from inbox -> comment-> browse all comments - sh.itjust.works

Hello, Infinity crashes when opening Inbox, clicking a comment, then clicking Click here to browse all comments. Thanks

I just found two packages that do the same thing as I did :

The last one comes with a blog post explaining the same things I did !

indexed-array

An extension to native Array which supports direct element lookup by position index or primary key.. Latest version: 1.0.0, last published: 8 years ago. Start using indexed-array in your project by running `npm i indexed-array`. There are no other projects in the npm registry using indexed-array.

npm

JS array with getter by ID ?

https://sh.itjust.works/post/1117288

JS array with getter by ID ? - sh.itjust.works

Hi ! Given the following sample items : | ID | First name | Age | | -------- | ---------- | — | | xvZwiCpi | Naomi | 42 | | Nzd9UsGT | Naomi | 24 | | QiDXP2wA | Thea | 53 | | JpYeAY7H | Jeremy | 35 | I can store these in an array : js const data = [ { id: 'xvZwiCpi', firstName: 'Frederic', age: 42 }, { id: 'Nzd9UsGT', firstName: 'Naomi', age: 24 }, { id: 'QiDXP2wA', firstName: 'Thea', age: 53 }, { id: 'JpYeAY7H', firstName: 'Mathew', age: 35 } ]; Thus access them the same way by ID : js console.log(data.find(item => item.id === 'xvZwiCpi')); And by properties : js console.log(data.find(item => item.firstName === 'Frederic').id); Or I can store these in an object : js const data = { 'xvZwiCpi': { firstName: 'Frederic', age: 42 }, 'Nzd9UsGT': { firstName: 'Naomi', age: 24 }, 'QiDXP2wA': { firstName: 'Thea', age: 53 }, 'JpYeAY7H': { firstName: 'Mathew', age: 35 } }; Thus more easily access properties by ID : js console.log(data['xvZwiCpi'].firstName); But more hardly access ID by properties : js console.log(Object.entries(data).find(([id, item]) => item.firstName = 'Frederic')[0]); I could duplicate IDs : js const data = { 'xvZwiCpi': { id: 'xvZwiCpi', firstName: 'Frederic', age: 42 }, 'Nzd9UsGT': { id: 'Nzd9UsGT', firstName: 'Naomi', age: 24 }, 'QiDXP2wA': { id: 'QiDXP2wA', firstName: 'Thea', age: 53 }, 'JpYeAY7H': { id: 'JpYeAY7H', firstName: 'Mathew', age: 35 } }; To slightly simplify that previous line : js console.log(Object.values(data).find(item => item.firstName = 'Frederic').id); But what if a single variable type could allow doing both operations easily ? js console.log(data['xvZwiCpi'].firstName); console.log(data.find(item => item.firstName === 'Frederic').id); Does that exist ? If not, I’m thinking about implementing it that way : js const data = new Proxy([ { id: 'xvZwiCpi', firstName: 'Frederic', age: 42 }, { id: 'Nzd9UsGT', firstName: 'Naomi', age: 24 }, { id: 'QiDXP2wA', firstName: 'Thea', age: 53 }, { id: 'JpYeAY7H', firstName: 'Mathew', age: 35 } ], { get: (array, property) => array[property] || array.find(item => item.id === property) }); In which case I’d put it in a lib, but how would this be named ? I’d also make a second implementation that would enforce ID uniqueness and use Map to map IDs with indexes instead of running find, while the first implementation would be fine for static data, the second one would be more suitable for dynamic data. Would this make sense ? Thanks

Multitask view on PopOS ?

https://sh.itjust.works/post/498955

Multitask view on PopOS ? - sh.itjust.works

Hello, Does Pop OS have a multitask view feature that I could assign a shortcut to, like illustrated here on Linux Mint ? Thanks