[-] KaKi87@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

I set such delays so that I have time to watch things happening in devtools, that's all.

However, reducing delays still doesn't allow the next text to appear simultaneously with the previous text disappearing.

The solution is figuring out how to overlay the texts without requiring a background color.

4

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/

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 !

[-] KaKi87@sh.itjust.works 1 points 1 year ago

It's a nasty one because there's no "reject all" button, it requires manually unchecking all checkboxes instead.

[-] KaKi87@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

That one uses a nasty cookie notice.

10
submitted 1 year ago* (last edited 1 year ago) by KaKi87@sh.itjust.works to c/lemmy@lemmy.ml

I tried the the conversation continues here button but it doesn't work for me :

I also tried the community's sidebar link but it results in timeout.

Thanks

PS : I'm sorry the GIF URL is from Discord but Lemmy converts to JPG and Infinity converts to WEBP so I didn't seem to have a choice.

[-] KaKi87@sh.itjust.works 2 points 1 year ago

Je ne suis là que depuis quelques semaines, et ne saurais donc dire.

[-] KaKi87@sh.itjust.works 3 points 1 year ago

J'ai également arrêté de suivre l'actu générale depuis environ 5 ans, ne suivant plus que la tech (ma passion) et certaines sciences qui m'intéressent, au final je m'en porte bien mieux.

[-] KaKi87@sh.itjust.works 3 points 1 year ago

Ou encore : uniquement la première phrase de chaque paragraphe.

[-] KaKi87@sh.itjust.works 2 points 1 year ago

un peu ironique de poster ça sur un agrégateur de liens

Concernant le Lemmy francophone en particulier, oui effectivement, car il existe encore trop peu de communautés thématiques, et les communautés généralistes sont effectivement inondées d'articles d'actualité.

Mais sur Reddit, avec un grand nombre de communautés thématiques, s'épargner les actualités est facile.

[-] KaKi87@sh.itjust.works 1 points 1 year ago

Perso je considère cette consommation négligeable.

[-] KaKi87@sh.itjust.works 3 points 1 year ago
[-] KaKi87@sh.itjust.works 2 points 1 year ago

Oui, mon premier commentaire était une réponse à OP, mais mon deuxième était une réponse à une réponse à mon premier, pas écrite par OP.

[-] KaKi87@sh.itjust.works 1 points 1 year ago

Sur mesure, via ConfigoMatic. N'achète pas de tour toute faite, renseigne-toi plutôt sur ce qui te conviendrait mieux.

[-] KaKi87@sh.itjust.works 5 points 1 year ago* (last edited 1 year ago)

Fin 2020, j'ai acheté un ThinkPad X260 pour moins de 290€ (livraison comprise) sur eBay, qui fonctionne toujours très bien aujourd'hui (depuis lequel j'écris d'ailleurs ce commentaire).

S'agissant d'un 12.5 pouces, j'ai choisi d'installer Ubuntu Unity, s'agissant pour moi de l'environnement de bureau optimal pour petits écrans.

Voici des captures que j'avais postées sur Reddit il y a peu (j'y ai indiqué qu'il s'agit d'un 14 pouces par erreur).

Il me sert de PC d'appoint pendant mes déplacements (ou quand j'ai la flemme de quitter mon lit 😅), mon PC principal étant une tour avec trois écrans sur un bureau motorisé. 😎

1
submitted 1 year ago* (last edited 1 year ago) by KaKi87@sh.itjust.works to c/programming@programming.dev

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 :

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 :

console.log(data.find(item => item.id === 'xvZwiCpi'));

And by properties :

console.log(data.find(item => item.firstName === 'Frederic').id);

Or I can store these in an object :

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 :

console.log(data['xvZwiCpi'].firstName);

But more hardly access ID by properties :

console.log(Object.entries(data).find(([id, item]) => item.firstName = 'Frederic')[0]);

I could duplicate IDs :

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 :

console.log(Object.values(data).find(item => item.firstName = 'Frederic').id);

But what if a single variable type could allow doing both operations easily ?

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 :

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

view more: next ›

KaKi87

joined 1 year ago