Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 08 08:40
    papandreou commented #784
  • Sep 08 08:09
    pingvinen commented #784
  • Aug 22 05:39

    papandreou on master

    13.0.1 (compare)

  • Aug 22 05:39

    papandreou on v13.0.1

    (compare)

  • Aug 22 05:34

    papandreou on toSatisfyUndefinedProp

    (compare)

  • Aug 22 05:34

    papandreou on master

    Fix bug that caused expect({foo… Merge pull request #852 from un… (compare)

  • Aug 22 05:34
    papandreou closed #852
  • Aug 20 14:06
    papandreou assigned #852
  • Aug 20 14:06
    papandreou opened #852
  • Aug 20 14:05

    papandreou on toSatisfyUndefinedProp

    Fix bug that caused expect({foo… (compare)

  • Jul 09 14:26

    papandreou on master

    Fix CHANGELOG generation in pre… (compare)

  • Jun 05 12:09

    papandreou on master

    Unskip test that succeeds now w… (compare)

  • May 31 05:48
    papandreou synchronize #784
  • May 31 05:47

    papandreou on camelCase

    Sketch out some basic tests Slow, naive implementation of t… Support camel case syntax withi… and 16 more (compare)

  • May 31 05:41

    papandreou on master

    Fix typos in test descriptions (compare)

  • May 31 05:28
    papandreou synchronize #784
  • May 31 05:28

    papandreou on camelCase

    Clean (compare)

  • May 30 22:10
    papandreou synchronize #784
  • May 30 22:10

    papandreou on camelCase

    simplify (compare)

  • May 30 21:42
    papandreou synchronize #784
Sune Simonsen
@sunesimonsen

going to have more than one UI rendering at the same time from the same browser

what you might run into is that you need more instances of something, but they you will just have global state holding models for those. Similar to how I have a lists of todo classes in an observable. .

Gustav Nikolaj
@gustavnikolaj
It means that the components are very closely tied to that global state model, rather than having props as interface. But yeah, I get your point. Realistically, most things aren't really ever going to be used outside that initial place.
Just noticed something weird.
  1. Add a todo item "foo"
  2. Add a todo item "bar"
  3. With the cursor in the todo input field, press TAB then SPACE

Expected: I can see a focus indicator, and the first item would be selected, and completed when space is selected|

Actual: No focus indicator, both items are completed

Sune Simonsen
@sunesimonsen
Yes I expect the example to be a bit bugging - slammed it together really quickly - I'll come back and brush of things.
Example of a simple state test, if you are curious:
import {
  allTodos,
  createTodo,
  visibilityFilter,
  visibleTodos,
  Todo,
} from "../public/model.js";

import unexpected from "unexpected";
import unexpectedDependable from "unexpected-dependable";

const expect = unexpected.clone().use(unexpectedDependable);

describe("visibleTodos", () => {
  describe("with an empty list of todos", () => {
    beforeEach(() => {
      allTodos([]);
    });

    it("returns an empty array", () => {
      expect(visibleTodos(), "to equal", []);
    });
  });

  describe("with list of todos that is all completed", () => {
    beforeEach(() => {
      allTodos([
        new Todo({ id: 0, text: "By milk", completed: true }),
        new Todo({ id: 1, text: "Paint the fence", completed: true }),
        new Todo({ id: 2, text: "Mow the lawn", completed: true }),
      ]);
    });

    describe("and the visibility filter is active", () => {
      beforeEach(() => {
        visibilityFilter("active");
      });

      it("returns an empty array", () => {
        expect(visibleTodos(), "to equal", []);
      });
    });
  });
});
Sune Simonsen
@sunesimonsen

Just noticed something weird.

  1. Add a todo item "foo"
  2. Add a todo item "bar"
  3. With the cursor in the todo input field, press TAB then SPACE

This is because you hit the toggle all first then the checkboxes - I'll fix up focus when I have a bit of time.

Haha okay the official ones also does that :wat:
Gustav Nikolaj
@gustavnikolaj
At least it's consistent :D
That's not how I would expect it to work, but I must be mistaken :D
Sune Simonsen
@sunesimonsen
Haha no - that seems pretty broken
Also no focus styling :sweat_smile:
Sune Simonsen
@sunesimonsen

@gustavnikolaj haha I guess somebody fix the focus styling in the latest version of the TodoMVC styles https://dependable-example-todomvc.surge.sh/

Maybe they went a bit over the top :sweat_smile:

Gustav Nikolaj
@gustavnikolaj
That "v" / downwards caret button is very surprising to me
Sune Simonsen
@sunesimonsen
Yes that has been there all along
Gustav Nikolaj
@gustavnikolaj
I didn't notice it at all before, and I don't know why you would ever want it
:D
Sune Simonsen
@sunesimonsen
Mhh I think they broke backward compatibility a bit :-)
Nahh that was just me breaking things.
Peter Müller
@Munter
Are any of you planning on seeing some of the tour in the city tomorrow? I was thinking of finding some place near the city center and bring a camera, possibly have a beer
Peter Müller
@Munter
Looks like i won't be able to be in the city after all. I'll have to watch on TV like everyone else :)
Gustav Nikolaj
@gustavnikolaj
Hehe... I don't think you go to the city today. Either you are there already, or you'll not be able to get there :D
Peter Müller
@Munter
What's a good library to use to get stable cache keys from json objects?
Andreas Lind
@papandreou
You mean sort of like crc16(JSON.stringify(obj))?
But probably shouldn't care about the key definition order?
Peter Müller
@Munter
We might have keys in different order, and those should hash to the same if the values don't change
Andreas Lind
@papandreou
Yeah, was just making sure that I understood what the ask was :)
Andreas Lind
@papandreou
I took a quick stab at it, but it looks like it's hard to beat the naive approach of:
const crypto = require('crypto');
const canonicalJson = require('canonical-json');

function hashCanonicalJson(value) {
  return crypto.createHash('sha1').update(canonicalJson(value)).digest('hex');
}
Peter Müller
@Munter
I was thinking the same, but was a bit discouraged at the download numbers of the canonical-json package. Couldn't find a different one that seemed more agreed upon though
Andreas Lind
@papandreou
It has 38K weekly downloads? Doesn't seem insanely risky?
Peter Müller
@Munter
I just expected more people to use canonical json object :)
Andreas Lind
@papandreou
It's one of those problems that are fairly easy to solve, so there are probably 50 libraries in npm that do the same :)
I'd just pick one and move on. Doesn't seem like something worth overengineering, unless we're talking about very big objects.
Peter Müller
@Munter
Not really :)
Sune Simonsen
@sunesimonsen
10K Hackernews demo with @dependable https://github.com/sunesimonsen/dependable-example-hackernews
(Not completely done yet)
Andreas Lind
@papandreou
Fix bug that caused expect({foo: 123}, 'to satisfy', {foo: undefined}) to pass: unexpectedjs/unexpected#852 :grimacing:
Andreas Lind
@papandreou
Took the liberty of merging and releasing it since I didn't hear anything :innocent:
Sune Simonsen
@sunesimonsen
Yes sorry @papandreou and just feel free to do that :-)
Andreas Lind
@papandreou
I do, but always good to get some :eyes: on stuff :)
Sune Simonsen
@sunesimonsen
It looks fine - and we have many tests :-)
Andreas Lind
@papandreou
Haha, yes. That does help :)
Miroslav Nikolov
@moubi

Hello Guys.
Can you share what do you use/d for documenting component libraries and/or possibly design system? We consider using Storybook as a playground + Storybook Doc for writing markdown pages with more extensive documentation.

Looking at Docusaurus as well but what pushes me back is the Algolia search which requires your site to be public.

Peter Müller
@Munter
@moubi You don't need to use algolia for search in docosaurus
Miroslav Nikolov
@moubi
@Munter is there an alternative that comes out of the box?
Peter Müller
@Munter
There are plugins to use local search instead. https://docusaurus.io/community/resources#search
1 reply
Peter Müller
@Munter
Looks like I might actually make it to my first real-life conference since corona :D
Fronteers next week
Gustav Nikolaj
@gustavnikolaj
Woot! Is that still a thing? ;)
Great to see that they are starting up again.
Bram Stein
@bramstein
Nice! There's also the Fontstand conference the day after.