11 Matching Annotations
- Aug 2023
-
stackoverflow.com stackoverflow.com
-
I make a file named: app/models/active_storage/attachment.rb. Because it's in your project it takes loading precedence over the Gem version. Then inside we load the Gem version, and then monkeypatch it using class_eval: active_storage_gem_path = Gem::Specification.find_by_name('activestorage').gem_dir require "#{active_storage_gem_path}/app/models/active_storage/attachment" ActiveStorage::Attachment.class_eval do acts_as_taggable on: :tags end The slightly nasty part is locating the original file, since we can't find it normally because our new file takes precedence. This is not necessary in production, so you could put a if Rails.env.production? around it if you like I think.
-
- Dec 2022
-
catalog.altadenalibrary.org catalog.altadenalibrary.org
-
catalog.altadenalibrary.org catalog.altadenalibrary.org
- Aug 2021
-
github.com github.com
-
In the vast majority of cases when I'm using prettier-ignore I'm only really looking to prevent it from breaking my code into new lines, whilst keeping its other transformations such as switching quotes and adding space between brackets. When ignoring single lines, fixing these formatting problems by hand is very manageable. With the ability to have Prettier ignore entire blocks of code I think the ability to specify what you want it to ignore is essential.
-
- Mar 2021
-
www.jackfranklin.co.uk www.jackfranklin.co.uk
-
Svelte is different in that by default most of your code is only going to run once; a console.log('foo') line in a component will only run when that component is first rendered.
Tags
- reasonable defaults
- turning things around / doing it differently
- Svelte vs. React
- important point
- opinion
- opinionated
- unfortunate defaults
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
- difference
Annotators
URL
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
As was mentioned in the comments above, the material design spec for buttons specifies that the text should be uppercase, but you can easily override its CSS property: paper-button { text-transform: none; }
-
-
material.io material.io
-
@use "@material/theme" with ( $primary: #FEDBD0, $on-primary: #442C2E);
-
- Oct 2020
-
www.basefactor.com www.basefactor.com
-
If you want to implement a form with a superb User Experience, you have to take care of many variables:
Tags
- too hard/difficult/much work to expect end-developers to write from scratch (need library to do it for them)
- difficult/hard problem
- form design
- easy to get wrong
- a lot of things to consider
- user experience
- can't keep entire system in your mind at once (software development) (scope too large)
Annotators
URL
-
-
github.com github.com
-
Svelte doesn't re-render, so you need to respond to component mount/dismount and prop changes separately as they are distinct concepts and never tied together, unlike in React.
Tags
- different way of thinking about something
- distinction
- lifecycle callbacks
- UI library: reacting to prop changes
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
Annotators
URL
-
-
medium.com medium.com
-
Sometimes, you may be tempted to write that wrapper. Because all your (React or Vue or insert your reactive framework here) instincts tell you so.Resist the temptation. There is a better way. A svelter way. Introducing: the use-directive (a.k.a. “actions”).
-
However, especially when starting out, it’s very easy to fall into the “this is how I did things in my previous framework” trap.
Tags
- different way of thinking about something
- Svelte: action (use:)
- overcoming preconceived opinions
- getting a fresh perspective
- Svelte
- paradigm shift
- trying to doing things the same way you did in a different library/framework (learning new way of thinking about something / overcoming habits/patterns/paradigms you are accustomed to)
Annotators
URL
-