12 Matching Annotations
- Mar 2022
-
github.com github.com
-
// Native const datePattern = /^(\d{2})-(\d{2})-(\d{4})$/; const [, month, day, year] = datePattern.exec('12-25-1995'); new Date(`${month}, ${day} ${year}`);
-
- Mar 2021
-
gitlab.gnome.org gitlab.gnome.org
-
When one is searching for it on the internet, there are many many people wondering how one can open .desktop files. It seems trivial, since one usually just has to click an item on the launcher so one thinks there must be some way.
-
- Jan 2021
-
forums.theregister.com forums.theregister.com
-
If upstream code presumes things will work that dont in snap (e.g. accesses /tmp or /etc) the snap maintainer has to rewrite that code and maintain a fork. Pointless work. Packaging for .deb is a no-brainer.
-
-
-
The CardLayout creates a store in context and the Card creates a standardized div container and registers it to the store so that the CardLayout has access to that DOM element. Then in afterUpdate you can move the DOM elements into columns and Svelte will not try to put them back where they go. It's a bit messy but it works.
-
-
-
I would love to see this features as well, since it makes component composition and reuse a lot easier.
-
- Nov 2020
-
github.com github.com
-
// replace css-loader with typings-for-css-modules-loader environment.loaders.get('moduleSass').use = environment.loaders.get('moduleSass').use.map((u) => { if(u.loader == 'css-loader') { return { ...u, loader: 'typings-for-css-modules-loader' }; } else { return u; } });
-
- Oct 2020
-
github.com github.com
-
One of Svelte's advantages, for me, is that I can test out ideas with relatively few lines of code. the #with feature could save me from adding a separate component for the content of an #each loop. I get frustrated when I have to create a new file, move the content of the #each clause, import it as a component, and add attributes and create exports for that, and implement events to send messages back, and event handlers, when I just wanted to test a small feature.
-
- Sep 2020
-
github.com github.com
-
I totally get not wanting to extend the syntax. I tried doing these things and in practice it was not easy or pretty. Actions provide a much cleaner and easier way to accomplish a certain set of functionality that would be much more difficult without it.
-
-
-
If this was tied into Svelte's flow with hooks this would not be necessary since it would know when it was being removed from the DOM.
-
You must: reference each element you are extending using refs or an id add code in your oncreate and ondestroy for each element you are extending, which could become quite a lot if you have a lot of elements needing extension (anchors, form inputs, etc.)
Tags
- framework taking care of responsibility so users can leverage it and not have to worry about that responsibility themselves
- scalability
- could be easier / more difficult than it needs to be
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- library/framework could make this easier
- why this feature is needed
- difficult/hard
Annotators
URL
-
- Jul 2020
-
code-examples.net code-examples.net
-
JSON parsing is always pain in ass. If the input is not as expected it throws an error and crashes what you are doing. You can use the following tiny function to safely parse your input. It always turns an object even if the input is not valid or is already an object which is better for most cases.
It would be nicer if the parse method provided an option to do it safely and always fall back to returning an object instead of raising exception if it couldn't parse the input.
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
I agree in general splitting an array, according to some property using the order of the elements (no take_drop_while) or to some other array (this request) is more difficult than it could be.
-