816 Matching Annotations
  1. May 2021
    1. I used to pull stunts like this all the time as soon as tables came. Really ugly, and may seriously embarrass any validator you run it trough: overlapping table cells. Works in most browsers though and even without css.
    1. I hate to be the guy who will destroy your day but... Tables. You need to work with nested tables/cells. If you think Gmail is annoying you will cry in agony if you also need Outlook support.Work with the good old HTML from the early 2000's. That's the only way to be sure everything will work as intended.Anything else will mostly result in a horrible mess, broken design and incompatible layouts.
    2. (And please, no "use a different email design service" answers, I don't have control over that)
    1. In a study of 34 grazing systems in operation for 10-20 years in southwestern Montana, Myers (1989a) found timing of grazing, duration of use, and frequency of fall grazing were important factors in successful management (Table 3). The effectiveness of livestock grazing management was judged based on the vigor, regeneration, and utilization of woody species, as well as on bank stability.
  2. Apr 2021
    1. This gem uses a Rack middleware to clear the store object after every request, but that doesn't translate well to background processing with Sidekiq. A companion library, request_store-sidekiq creates a Sidekiq middleware that will ensure the store is cleared after each job is processed, for security and consistency with how this is done in Rack.
    1. I really like the ideas in this game: the theme, what it's trying to accomplish (explore the problems with imperialism, if I understood correctly), the game board, the game in general. I want to like it.

      but, I don't think I would like this one enough due to the luck and relying on other players' whims (trading) mechanisms:

      • Dice Rolling
      • Push Your Luck

      You can risk a lot getting an expensive estate, but if you push your luck too much, your risk/gamble won't pay off and you'll permanently lose that [pawn] and those victory points.

    1. With Stack Overflow for Teams being a flexible platform, we’ve seen customers use it for a wide variety of use cases: A platform to help onboard new employees A self-serve help center to reduce support tickets Collaboration and documentation to drive innersource initiatives Breaking down silos and driving org wide transformation like cloud migration efforts A direct customer support platform Enable people who are working towards a common goal, whether a startup or a side project, to develop a collective knowledge base
    1. The standard ext4 Linux file system also allocates space for a file-creation timestamp in its internal file system structures, but this hasn’t been implemented yet. Sometimes, this timestamp is populated, but you can’t depend on the values in it.
    1. If you’re installing new sod, you may use a light roller to make sure the pieces come into close contact with soil for the roots to grow and take hold.
    2. There are times when you may need to flatten a bumpy lawn. For example, a golf course or a cricket pitch may be rolled to attain a smooth, level surface for playing. This is when a lawn roller may be needed.
    1. To make sure that participants couldn’t learn and predict where text field alternatives might show up during the test, we randomized the order in which we presented those text fields.
  3. Mar 2021
    1. Not enjoying Xcode, Amir used RubyMotion instead. Amir had real-world experience with Xcode and Objective-C, but didn't like it at all. Amir also has a Ruby background and went with RubyMotion to build A Dark Room. The command-line interface, the testing framework, the gems libraries and the CocoaPods integration and the freedom to use any text editor contributed to his decision.
    1. Some pesky non-human users (namely computers) have taken to “hotlinking” assets via the raw view feature — using the raw URL as the src for a <script> or <img> tag.
    2. The key point is that this is a feature to improve the experience of our human users.
    3. The problem is that these are not static assets. The raw file view, like any other view in a Rails app, must be rendered before being returned to the user. This quickly adds up to a big toll on performance. In the past we’ve been forced to block popular content served this way because it put excessive strain on our servers.
    1. Just as we've become super-human thanks to telephones, calendars and socks, we can continue our evolution into cyborgs in a concrete jungle with socially curated bars and mathematically incorruptible governance.
    2. we should eagerly anticipate granting ourselves the extra abilities afforded to us by Turing machines
    3. Stop thinking of the ideal user as some sort of honorable, frontier pilgrim; a first-class citizen who carries precedence over the lowly bot. Bots need to be granted the same permission as human users and it’s counter-productive to even think of them as separate users. Your blind human users with screen-readers need to behave as “robots” sometimes and your robots sending you English status alerts need to behave as humans sometimes.
    1. Application: 3-D Shape RegistrationAn important problem in model-based recognition is to find the transformation of a set of datapoints that yields the best match of these points against a shape model. The process is oftenreferred to asdata registration. The data points are typically measured on a real object by rangesensors, touch sensors, etc., and given in Cartesian coordinates. The quality of a match is oftendescribed as the total squared distance from the data pointsto the model. When multiple shapemodels are possible, the one that results in the least total distance is then recognized as the shapeof the object.Quaternions are very effective in solving the above least-squares-based registration problem.
    1. There is obvious connections between the flow paths of a use case and its test cases. Deriving functional test cases from a use case through its scenarios (running instances of a use case) is straightforward.
    2. With content based upon an action or event flow structure, a model of well-written use cases also serves as an excellent groundwork and valuable guidelines for the design of test cases
    3. Use cases are not only texts, but also diagrams, if needed.
    1. A complicated and messy essay underlining the fact that people can figure out how to use technology in off-label ways to better humanity rather than sitting back on the intended uses of these tools.

      I definitely want to reference this in my presentation part of my workshop for "A Twitter of Our Own" for OERxDomains21.

    2. And it’s tempting for engineers to think decentralising the Web can be achieved with technology. But really, it’s people who will make it happen. Rather than staying put in our little filter bubbles, we can burst out of them — and be radically sociable, delinquent, and make a scene.

      off label uses of technology are important

      I'm reminded of how Kicks Condor has appreciated my "people work" in the past.

    1. “Follow your blisters” implies something that you come back to so many times that you eventually move past the blister stage, into toughened skin. Eventually, the activity “marks you” through use and practice, and you develop a special competence. When you practice an activity a bit more obsessively than other people, you build unique character – you earn some wear and some healing that makes you idiosyncratic, and a little unbalanced.It is something that you don’t need to put on your to-do list, something you care enough about to return to repeatedly, even though it causes discomfort. Over time, you develop a layer of protection that enables you to do that something more easily.
    1. In recent years, the U.S. federal government has invested approximately $463 billion annually in interventions that affect the overall health and well-being of children and youth, while state and local budgets have devoted almost double that amount. The potential returns on these investments may not only be substantial but also have long-lasting effects for individuals and succeeding generations of their families.

      Ideally, those tasked with making these investments would have available to them the evidence needed to determine the cost of all required resources to fully implement and sustain each intervention, the expected returns of the investment, to what extent these returns can be measured in monetary or nonmonetary terms, and who will receive the returns and when. As a result of a number of challenges, however, such evidence may not be effectively produced or applied. Low-quality evidence and/or a failure to consider the context in which the evidence will be used may weaken society's ability to invest wisely, and also reduce future demand for this and other types of evidence.

      Advancing the Power of Economic Evidence to Inform Investments in Children, Youth, and Families highlights the potential for economic evidence to inform investment decisions for interventions that support the overall health and well-being of children, youth, and families. This report describes challenges to the optimal use of economic evidence, and offers recommendations to stakeholders to promote a lasting improvement in its quality, utility, and use.

    1. I would much rather have a "cosine" module than a "trigonometry" module because chances are good I only need a small fraction of the utilities provided by the larger trig module.
    2. Write modules for publication, even if you only use them privately. You will appreciate documentation in the future.
    3. Small modules are extremely versatile and easy to compose together in an app with any number of other modules that suit your needs.
    4. Second, I don't agree that there are too many small modules. In fact, I wish every common function existed as its own module. Even the maintainers of utility libraries like Underscore and Lodash have realized the benefits of modularity and allowed you to install individual utilities from their library as separate modules. From where I sit that seems like a smart move. Why should I import the entirety of Underscore just to use one function? Instead I'd rather see more "function suites" where a bunch of utilities are all published separately but under a namespace or some kind of common name prefix to make them easier to find. The way Underscore and Lodash have approached this issue is perfect. It gives consumers of their packages options and flexibility while still letting people like Dave import the whole entire library if that's what they really want to do.
    1. This is not a physical phenomenon: the software does not actually decay, but rather suffers from a lack of being responsive and updated with respect to the changing environment in which it resides.
    1. To the consternation of some users, 3.x employed Unicode variable names such as λ, φ, τ and π for a concise representation of mathematical operations. A downside of this approach was that a SyntaxError would occur if you loaded the non-minified D3 using ISO-8859-1 instead of UTF-8. 3.x also used Unicode string literals, such as the SI-prefix µ for 1e-6. 4.0 uses only ASCII variable names and ASCII string literals (see rollup-plugin-ascii), avoiding encoding problems.
    1. Normally you should not register a named module, but instead register as an anonymous module: define(function () {}); This allows users of your code to rename your library to a name suitable for their project layout. It also allows them to map your module to a dependency name that is used by other libraries.
    1. Before a bug can be fixed, it has to be understood and reproduced. For every issue, a maintainer gets, they have to decipher what was supposed to happen and then spend minutes or hours piecing together their reproduction. Usually, they can’t get it right, so they have to ask for clarification. This back-and-forth process takes lots of energy and wastes everyone’s time. Instead, it’s better to provide an example app from the beginning. At the end of the day, would you rather maintainers spend their time making example apps or fixing issues?
    1. The study, published in Nature Food, presents EDGAR-FOOD – the first database to break down emissions from each stage of the food chain for every year from 1990 to 2015. The database also unpacks emissions by sector, greenhouse gas and country. 
    1. This is my absolute favorite feature ever and the official reason for (re-)writing Trailblazer 2.1. It makes me happy every time I use it.
  4. Feb 2021
    1. It's hard to say why people think so because you certainly don't need to know category theory for using them, just like you don't need it for, say, using functions.
    1. The bare bones operation without any Trailblazery is implemented in the trailblazer-operation gem and can be used without our stack.
    2. While Trailblazer offers you abstraction layers for all aspects of Ruby On Rails, it does not missionize you. Wherever you want, you may fall back to the "Rails Way" with fat models, monolithic controllers, global helpers, etc. This is not a bad thing, but allows you to step-wise introduce Trailblazer's encapsulation in your app without having to rewrite it.
    3. Only use what you like.
    4. you can pick which layers you want. Trailblazer doesn't impose technical implementations
    1. No one has requested it before so it's certainly not something we're planning to add.
    2. To give a little more context, structures like this often come up in my work when dealing with NoSQL datastores, especially ones that rely heavily on JSON, like Firebase, where a records unique ID isn't part of the record itself, just a key that points to it. I think most Ruby/Rails projects tend towards use cases where these sort of datastores aren't appropriate/necessary, so it makes sense that this wouldn't come up as quickly as other structures.
    1. ActiveInteraction also supports merging errors. This is useful if you want to delegate validation to some other object. For example, if you have an interaction that updates a record, you might want that record to validate itself. By using the #merge! helper on errors, you can do exactly that.
    1. In this idealised utopia we obviously want to place value on sharing and curation as well as original creation, which means giving a small fraction of the payment to the re-publisher as well.We should note monetisation of all this content is optional. Some websites would allow their content to be transcluded for free, while others might charge hefty fees for a few sentences. If all goes well, we'd expect the majority of content on the web to be either free or priced at reasonable micro-amounts.

      While this is nice in theory, there's a long road strewn with attempts at micropayments on the web. I see new ones every six months or so. (Here's a recent one: https://www.youtube.com/playlist?list=PLqrvNoDE35lFDUv2enkaEKuo6ATBj9GmL)

      This also dramatically misses the idea of how copyright and intellectual property work in many countries with regard to fair use doctrine. For short quotes and excerpts almost anyone anywhere can do this for free already. It's definitely nice and proper to credit the original, but as a society we already have norms for how to do this.

    1. There is one situation where iframes are (almost) required: when the contents of the iframe is in a different domain, and you have to perform authentication or check cookies that are bound to that domain. It actually prevents security problems instead of creating them. For example, if you're writing a kind of plugin that can be used on any website, but the plugin has to authenticate on another domain, you could create a seamless iframe that runs and authenticates on the external domain.
    1. remember that for each loaded iFrame, a DOM is created, HTML requests are made and document wrappers are instantiated, eating memory and bandwidth in the process
    1. Usually, if you can do it without an iframe, that is a better option. I'm sure others here may have more information or more specific examples, it all comes down to the problem you are trying to solve.
    2. think about them as a text/markup equivalent to the way a video or another media file would be embedded
    3. but I wouldn't use a frameset for anything but a manual since it no longer exists in html5. Example: Game maker manual
  5. Jan 2021
    1. Systemd problems might not have mattered that much, except that GNOME has a similar attitude; they only care for a small subset of the Linux desktop users, and they have historically abandoned some ways of interacting the Desktop in the interest of supporting touchscreen devices and to try to attract less technically sophisticated users. If you don't fall in the demographic of what GNOME supports, you're sadly out of luck.
    1. Use-case party I asked some CSS developers when they last used calc() so we could have a nice taste here for for how others use it in their day-to-day work.
    1. toppings on a spreadsheet sundae.🍨🍦

      One of my fav toppings is to use Google Forms. Sheets is integrated completely there. In fact this is practically my only use case for google sheets so I am grateful for discussion of add-ons and other uses.

    2. I use sheets for organizing lists of people, topics and grades, as well as managing budgets, ideas and plans.

      Use case #1. How might I use it? How might others use it?

    1. Maybe $$slots like $$props? My use case is that I'd like to wrap a slot's content in an element that applies styling that I'd like absent without the slotted content. Something like this: {#if $$slots.description} <div class="description"> <slot name="description"></slot> </div> {/if}
    1. If components gain the slot attribute, then it would be possible to implement the proposed behavior of <svelte:fragment /> by creating a component that has a default slot with out any wrappers. However, I think it's still a good idea to add <svelte:fragment /> so everyone who encounters this common use case doesn't have to come up with their own slightly different solutions.
    1. I want to make some add-ons or wrappers on components e.g BigButton.svelte <script> import Button from './Button.svelte' </script> <Button fz="16" h="64" {...$$props}> <slot slot="prepend" name="prepend" /> <slot /> <slot slot="append" name="append" /> </Button>
    1. If it's behaviour that you can imagine needing to reuse among multiple components, or if it's something that you can imagine applying to an element inside an {#if ...} block (for example), then it probably belongs in an action. It it's something that 'belongs' to the component itself, rather than a specific element, then it's probably more of a lifecycle thing.
    2. The use:action method seems cleaner, but aside from that, are there any underlying differences between these two methods that would make one preferred over the other in certain situations?
    1. Popper for Svelte with actions, no wrapper components or component bindings required! Other Popper libraries for Svelte (including the official @popperjs/svelte library) use a wrapper component that takes the required DOM elements as props. Not only does this require multiple bind:this, you also have to pollute your script tag with multiple DOM references. We can do better with Svelte actions!
    1. Disk space is an issue. Resource usage is an issue. Those new packages nowadays need huge amount of storage to finally do the exact same thing as their older and lighter deb counterpart. Whatever the price of storage, it’s the opposite of a progress, it’s not optimal at all.
    1. This is probably rare enough that you would probably make a class (e.g. .link-looking-button) that incorporates the reset styles from above and otherwise matches what you do for anchor links.
    2. But of course, there are UX implications. For example, it can be harder to select the text, and the entire element needs fairly complex styling to create clear focus and hover states. There are also accessibility implications, like the fact that the content of the entire card is read before it is announced as a link.
    3. The second example also opens up the possibility of including multiple links. You can’t nest links, so things get a little tricky if you need to. It’s possible though, by making the individual links set above the card-covering link with z-index.
    1. One lesser-appreciated user-behaviour is when a user would like to choose an alternative download location. On a download link, your user can right-click -> “save link as…” and place the download directly into a folder of their choice. Handy if you want something to go directly to removable media, for example. On a download button, there’s no such option.
    2. This raises a very important point: we can’t know every user’s reason for why they’re visiting our website, but we can use the tools made available to us to help guide them along their way. If that means storing an HTML document for use offline, we’re empowered to help make the experience as easy as possible.
  6. Dec 2020
    1. Emily. J. Miller. - FDA {@FDASpox} (2020) Convalescent plasma has shown to be beneficial for 35% of patients. This risk reduction figure - shown in chart below - is from @MayoClinic data from expanded access program that was analyzed by FDAA for the emergency use authorization announced today. Twitter. Retrieved from: https://twitter.com/FDASpox/status/1297706985039835136

    1. Saving form data across sessions — what do people hate more than filling out a form? Filling out a form twice!
    2. Experiment with different states while developing — When working on an app, it’s often useful or necessary for the app to have a certain state to be able to work on particular styling and functionality, (e.g. styling a list of items and removing items requires items). Rather than recreating an app’s state on every refresh, Local Storage can persist that state, making development much more efficient and enjoyable.
    3. A simple, fake backend for your frontend React projects — It’s often nice to add the appearance of a backend/database to your frontend portfolio projects. The extra functionality will take your app to the next level, improve the user experience and impress potential employers.
    1. People really don't stress enough the importance of enjoying what you're programming. It aids creativity, makes you a better teammate, and makes it significantly easier to enter a state of flow. It should be considered an important factor in choosing a web development framework (or lack thereof). Kudos!
    1. # fix a bug in one of your dependencies vim node_modules/some-package/brokenFile.js # run patch-package to create a .patch file npx patch-package some-package

      I love how directly this allows you to make the change -- directly on the source file itself -- and then patch-package does the actual work of generating a patch from it. Brilliant.

    1. Making UIs with Svelte is a pleasure. Svelte’s aesthetics feel like a warm cozy blanket on the stormy web. This impacts everything — features, documentation, syntax, semantics, performance, framework internals, npm install size, the welcoming and helpful community attitude, and its collegial open development and RFCs — it all oozes good taste. Its API is tight, powerful, and good looking — I’d point to actions and stores to support this praise, but really, the whole is what feels so good. The aesthetics of underlying technologies have a way of leaking into the end user experience.
    1. Better contribution workflow: We will be using GitHub’s contribution tools and features, essentially moving MDN from a Wiki model to a pull request (PR) model. This is so much better for contribution, allowing for intelligent linting, mass edits, and inclusion of MDN docs in whatever workflows you want to add it to (you can edit MDN source files directly in your favorite code editor).
    1. node-sass may be faster than dart-sass, but as of writing this dart-sass is the only library which implements the @use rule, which is strongly recommended over @import. According to the official sass-lang website:
    1. Workers KV is generally good for use-cases where you need to write relatively infrequently, but read quickly and frequently. It is optimized for these high-read applications
  7. Nov 2020
    1. But seriously, give snowpack a read to understand the benefits of leaning on standard esm imports, allowing you to avoid a bundling process entirely.
    2. I don't need to support non-esm browsers for most projects and I really like the idea of a super light build process. By removing the complexity of configuration and the overhead of bundling, svelvet makes the development process an optimal experience for myself and hopefully others
    1. Allowing parent layer metadata to be saved for a layer, regardless if the parent layer is in the save command, would be a huge win for those of us working on CI/remote systems. Reusing parent layers used to be ridiculously easy. It would be good if we could get some comparably easy way to do it now.
    1. Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use.
    1. I have a component, and want to let the user specify what HTML tags wrap certain text rendered by the component. So the component user can say use <b></b> or <h1></h1> etc.
    1. The rule is written @forward "<url>". It loads the module at the given URL just like @use, but it makes the public members of the loaded module available to users of your module as though they were defined directly in your module. Those members aren’t available in your module, though—if you want that, you’ll need to write a @use rule as well.

      Just like how you have to also import (@use) a JS module if you want to use it locally, even if you export (@forward) it.

    1. The file is only imported once, no matter how many times you @use it in a project.

      Is this @use sort of like import is in JavaScript (vs require?? does that import file again?)? Or maybe it's more like require vs. load in Ruby?

    2. The new @use is similar to @import. but has some notable differences:
    3. In brief, @import is being replaced with more explicit @use and @forward rules. Over the next few years Sass @import will be deprecated, and then removed.
    1. The success of JSX has proved that the second curly is unnecessary. Moreover, a lot of people — particularly those who have been exposed to React — have a visceral negative reaction to double curlies, many of them assuming that it brings with it all the limitations of crusty old languages like Mustache and Handlebars, where you can't use arbitrary JavaScript in expressions.
  8. Oct 2020
    1. Library author here. I'm always fascinated by new ways people can invalidate my assumptions. I mean that in a sincerely positive way, as it results in learning.
    2. As I said above, the intervening time matters in my use case. The value can become invalid after a while, so I want to make sure that it gets checked just before it's submitted.
    3. This is for a time picker. If you're picking times for today, you may pick a time that is 15 minutes from now. It's valid now because it's currently in the future. If you don't touch the form for the next 20 minutes then click submit, the submission should be prevented because your selected time is now 5 minutes in the past.
    1. That is certainly a good use-case. One thing you can do is to require something other than a user-chosen string as a username, something like an email address, which should be unique. Another thing you could do, and I admit this is not user-friendly at all, to let them sign up with that user name, but send the user an email letting them know that the username is already used. It still indicates a valid username, but adds a lot of overhead to the process of enumeration.
    1. you are granting us the right to use your User Content without the obligation to pay royalties to any third party
    2. You or the owner of your User Content still own the copyright in User Content sent to us, but by submitting User Content via the Services, you hereby grant us an unconditional irrevocable, non-exclusive, royalty-free, fully transferable, perpetual worldwide licence to use, modify, adapt, reproduce, make derivative works of, publish and/or transmit, and/or distribute and to authorise other users of the Services and other third-parties to view, access, use, download, modify, adapt, reproduce, make derivative works of, publish and/or transmit your User Content in any format and on any platform, either now known or hereinafter invented.
    1. Wondering how to get field state from multiple fields at once? People coming from Redux-Form might be wondering where the equivalent of Redux Form's Fields component is, as a way to get state from several fields at once. The answer is that it's not included in the library because it's so easy to write one recursively composing Field components together.
    2. Listening for External Changes By wrapping a stateful ExternalModificationDetector component in a Field component, we can listen for changes to a field's value, and by knowing whether or not the field is active, deduce when a field's value changes due to external influences.
    1. Looks like the problem is that debounce defaults to waiting for 0 ms ... which is completely useless!

      It would be (and is) way to easy to omit the 2nd parameter to https://lodash.com/docs/4.17.15#debounce.

      Why is that an optional param with a default value?? It should be required!

      There must be some application where a delay of 0 is useless. https://www.geeksforgeeks.org/lodash-_-debounce-method/ alludes to / implies there may be a use:

      When the wait time is 0 and the leading option is false, then the func call is deferred until to the next tick.

      But I don't know what that use case is. For the use case / application of debouncing user input (where each character of input is delayed by at least 10 ms -- probably > 100 ms -- a delay of 0 seems utterly useless.

    1. Polyfills are great for methods like String.prototype.trim because they allow you to use the methods on String instances.
    1. Not all application state belongs inside your application's component hierarchy. Sometimes, you'll have values that need to be accessed by multiple unrelated components, or by a regular JavaScript module.
    1. By default all content inside template strings is escaped. This is great for strings, but not ideal if you want to insert HTML that's been returned from another function (for example: a markdown renderer). Use nanohtml/raw for to interpolate HTML directly.
    1. trusktr herman willems • 2 years ago Haha. Maybe React should focus on a template-string syntax and follow standards (and provide options for pre-compiling in Webpack, etc).

      Well anywho, there's other projects now like hyperHTML, lit-html, etc, plus some really fast ones: https://www.stefankrause.ne...

      React seems a little old now (and the new Hooks API is also resource heavy).

      • Share ›  Michael Calkins trusktr • 4 years ago • edited That's a micro optimization. There isn't a big enough difference to matter unless you are building a game or something extraordinarily odd.

      • Share › −  trusktr Michael Calkins • 2 years ago True, it matters if you're re-rendering the template at 60fps (f.e. for animations, or for games). If you're just changing views one time (f.e. a URL route change), then 100ms won't hurt at all.

    1. I suppose it all comes down to tooling. It should be easy to author a pattern. A set of implicit (possibly explicit) patterns to author patterns may be useful.
    1. if we create a new branch or scope for some corner cases, we should have full features of a component without creating a new file
    2. This seems crucial, for example for #if inside #each {#each boxes as box} {@const b = box?.a?.b} {#if b} <p>{b}</p> {/if} {/each}
    3. but this RFC addresses a significant pain point I've had with {#each} blocks doing data visualization and graphics.
  9. Sep 2020
    1. In my opinion, because Webpack was one of the first bundlers, is heavily packed with features, and has to support swathes of legacy code and legacy module systems, it can make configuring Webpack cumbersome and challenging to use. Over the years, I’ve written package managers, compilers, and bundlers, and I still find configuring Webpack to be messy and unintuitive.
    1. But this is only a halfway decent way to clarify that this is an external dependency, because the only way to resolve a peer dependency warning is to install react from npm—there's no way to notify npm that you resolve the dependency to a browser global. So peer dependencies should be avoided in favor of external declarations. Then Rollup will take care of warning about "unresolved dependencies", even if external declarations can't express a particular version range with which your library is compatible like peer dependencies can.

      Interesting. Didn't realize. From my perspective, I usually do install packages via npm, so wouldn't have known about this problem.

      npm and rollup both try to solve this problem but in different ways that apparently conflict? So if a lib author lists peerDependencies then it can cause problems for those getting lib via browser (CDN)? How come so many libs use it then? How come I've never heard of this problem before?

    1. Svelte will not offer a generic way to support style customizing via contextual class overrides (as we'd do it in plain HTML). Instead we'll invent something new that is entirely different. If a child component is provided and does not anticipate some contextual usage scenario (style wise) you'd need to copy it or hack around that via :global hacks.
    2. Explicit interfaces are preferable, even if it places greater demand on library authors to design both their components and their style interfaces with these things in mind.
    1. This has already forced me to forgo Svelte Material because I would like to add some actions to their components but I cannot and it does not make sense for them to cater to my specific use-case by baking random stuff into the library used by everyone.
    2. The point of the feature is to not rely on the third-party author of the child component to add a prop for every action under the sun. Rather, they could just mark a recipient for actions on the component (assuming there is a viable target element), and then consumers of the library could extend the component using whatever actions they desire.
    3. They don't need to add a prop for every action. The action itself can be passed in as a prop. <script> export let action; </script> <div use:action>whatever</div> The argument for the action can be another prop or can be part of the same prop.
    1. Your tooltip component will have to wrap your image with a span tag or something, it can’t just add events to its children. And if you are adding multiple actions to it you will have to wrap it multiple times.
      <Concern1> <Concern2> </Concern2> </Concern1>

      vs.

      <img use:concern1 use:concern2>