10,000 Matching Annotations
- Mar 2021
-
github.com github.com
-
-
I don't myself understand what's going on, it clearly has something to do with source maps, but may also have to do with other sprockets changes.
-
sprockets 4 makes Chrome browser identification of SCSS css lines _worse_
-
But maybe few are still using sprockets at all, for JS or (S)CSS anymore? Hard to say.
-
But yeah, I'm not sure how you would determine which was the "recommended way" really. I don't see anything in Rails docs saying either way.
-
But last I have seen comments from DHH, he considered webpack(er) recommended for JS, but Sprockets still the preferred solution for (S)CSS.
-
I don't really understand what's going on. Clearly source maps have something to do with it -- a source map feature that doesn't handle SCSS very well, apparently.
-
If I can't do something to change the sprockets 4 debugging experience I am seeing, I am going to probably downgrade back to sprockets 3. I am finding it impossible to develop CSS the ways I am used to.
-
Is there a PR to... something? sassc-rails? That would make the patch not necessary? (I don't know if there's any good way to monkey-patch that in, I think you have to fork? So some change seems required...) Should the defaults be different somehow? This is very difficult to figure out.
-
I am not sure this whole ecosystem currently has much maintainers unfortunately. :( Pick your reaction
-
Is there a PR to... something? sassc-rails?
-
I'm not sure about all consequences of my change and this is very complex.
-
I agree about lack of maintenance. It's probably because people use more and more Webpack.
-
But I can describe a simple reproduction case to demonstrate the developer inconvenience (can provide a sample app if it's helpful).
Tags
- minimal reproducible example
- shift in preference
- unfortunate that this is no longer maintained
- switching/migrating to something different
- switching/migrating from Sprockets to Webpack (Rails)
- difficult/hard problem
- providing an example app (minimal reproducible example)
- official preferred convention / way to do something
- admit the limitations/shortcomings of your argument/benefits
- falling out of favor
- is anyone even still using it anymore?
- don't understand even what's going on, let alone how to go about finding/identifying/fixing the problem
- detailed issue/report
- where (which project) do I even report this problem/bug? (whose responsibility is it?)
- abandoning/migrating away from
- made it worse
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- sprockets
- webpack
Annotators
URL
-
-
github.com github.com
-
Thanks for posing that question @SamSaffron
-
-
github.com github.com
-
# This behavior can be disabled with: # # environment.unregister_postprocessor 'application/javascript', Sprockets::SafetyColons
but it appears to no longer be possible in latest version...
-
For JS developers who are colonfobic
-
-
github.com github.com
-
What is the point of avoiding the semicolon in concat_javascript_sources
For how detailed and insightful his analysis was -- which didn't elaborate or even touch on his not understanding the reason for adding the semicolon -- it sure appeared like he knew what it was for. Otherwise, the whole issue would/should have been about how he didn't understand that, not on how to keep adding the semicolon but do so in a faster way!
Then again, this comment from 3 months afterwards, indicates he may not think they are even necessary: https://github.com/rails/sprockets/issues/388#issuecomment-252417741
Anyway, just in case he really didn't know, the comment shortly below partly answers the question:
Since the common problem with concatenating JavaScript files is the lack of semicolons, automatically adding one (that, like Sam said, will then be removed by the minifier if it's unnecessary) seems on the surface to be a perfectly fine speed optimization.
This also alludes to the problem: https://github.com/rails/sprockets/issues/388#issuecomment-257312994
But the explicit answer/explanation to this question still remains unspoken: because if you don't add them between concatenated files -- as I discovered just to day -- you will run into this error:
(intermediate value)(...) is not a function at something.source.js:1, apparently because when it concatenated those 2 files together, it tried to evaluate it as:
({ // other.js })() (function() { // something.js })();It makes sense that a ; is needed.
-
And we shave off 6 or so seconds, that is huge.
-
And no need to walk backwards through all these strings which is surprisingly inefficient in Ruby.
-
Essentially after any edit of any js file if we reload /qunit it takes us about 10 seconds for the page to render.
-
Since the common problem with concatenating JavaScript files is the lack of semicolons, automatically adding one (that, like Sam said, will then be removed by the minifier if it's unnecessary) seems on the surface to be a perfectly fine speed optimization.
-
reducing it down to one call significantly speeds up the operation.
-
Granted it's a toy example using StringIO
-
I feel like the walk in string_end_with_semicolon? is unnecessarily expensive when having an extra semicolon doesn't invalidate any JavaScript syntax.
-
I was debugging our painfully slow reload times in Discourse when running qunit.
Tags
- interesting to learn how they arrived here
- I have this problem too
- performance optimization
- going unspoken
- fixing one problem inadvertently broke / made worse something else
- coming up with hypothetical examples
- contrived/toy example
- wasteful/inefficient use of resources
- Ruby
- is this a serious question?
Annotators
URL
-
-
github.com github.com
-
putting a line break before the directive in the Gem (not suitable because I don't own the gem)
-
I've been able to find three alternatives ahead of the bugfix
-
I confirm that since version 4.0.0 of sprockets, a single line directive is breaking the source maps and the javascript debugging system by consequence.
-
-
github.com github.com
-
-
There's not a way to do it at the moment without enabling all debug features.
-
I don't get it. Can someone please explain? I've upgraded my Rails project to Sprockets 4, just to get source maps in production. Instead I got sourcemaps in development?
-
You'll still get the correct backtrace, and can use that to view your own sources locally though.
-
Goal: Give bug trackers like bugsnag access to sprockets generated source maps.
-
-
Note: The above rake task executes after the default rake assets:precompile runs, it doesn't replace the default rails task
-
Any update on this?
-
Sorry to bump this but we're also in the same situation
-
we want source maps in production (like DHH)
-
I totally understand that there may be a majority still considering this a bad practice and thus keeping it disabled by default in production seem ok. But there could at least be an option to enable it for people who want to, no?
-
After waiting years for sprockets to support this we were very happy to see that sprockets 4 officially added support (thanks ), but then when trying to upgrade we noticed there's actually no way to use it in production... (without brittle hacks mentioned above).
-
Now that source maps in production by default seems to be the official Rails position, can we expect some movement on this?
-
If you don't mind putting the sourcemap url in the minified JS
-
minified_url: MINIFIED_URL_PATH, source_map: HTTP::FormData::File.new(LOCAL_SOURCEMAP_PATH)
-
//= link application.js.map
-
While I understand orgs wanting not to expose their unminified source, it's security through obscurity (meaning it's not adding any real security).
-
The only place I can find it is in the sprockets-rails gem. javascript_include_tag calls this: def find_debug_asset(path) if asset = find_asset(path, pipeline: :debug) raise_unless_precompiled_asset asset.logical_path.sub('.debug', '') asset end end
-
If I'm understanding correctly, this means that Sprockets only adds sourceMappingURL when assets are dynamically compiled.
-
I'd be happy to open a PR for this, but I'm not sure exactly what code needs to change. default_source_map.rb and source_map_utils.rb seem like candidates, but I'd appreciate guidance
-
It seems I'm in the minority, and Sprockets seems to already pretty far along in the beta process, so at most we should add a configuration option to enable it for static compilation.
-
modifying my build process to send the source map to my error logging service, Rollbar
Tags
- read the source code
- all or nothing (granularity of control)
- rails: the Rails way
- clarification
- unfortunate
- "If I'm understanding correctly"
- contributing: offering to help
- sad/unfortunate conclusion
- they were confused
- the needs/wishes of a minority
- missing configuration option or way to customize this behavior
- issues: follow-up/ping
- irony
- stated goals
- official preferred convention / way to do something
- issues: for improving documentation
- reasonable defaults
- source maps: using in production
- error reporting in production
- workaround
- security through obscurity
- best practices
- sprockets
- open-source software: progress seems slow
- security: unobfuscated source code
- can be disabled by default but at least provide a way to opt in if needed
- surprising behavior
Annotators
URL
-
-
github.com github.com
-
Sprockets 4: The effect of config.assets.debug does not match the rails documentation.
-
This appears to be an undocumented breaking change. For example, the word "debug" does not appear in the sprockets 4 changelog.
-
I'm getting mixed signals
-
I don't even know how to tell if they're working 100%, I'm getting mixed signals ..
-
Should it only contain link* calls?
-
When should I use link, vs dir, vs. tree?
-
but I still have no idea if I'm writing this new file correctly.
-
-
The docs say: "When using Rails and Sprockets in development mode, no assets are concatenated."
-
concatenation still occurs.
Tags
- easy to get wrong
- I have this problem too
- how do you know if you are doing it correctly? (need better feedback/discoverability)
- seemingly contradictory
- no longer the case (outdated info)
- why aren't people talking about/asking this?
- annotation meta: may need new tag
- issues: for first impressions / beginner trouble
- breaking change
- documentation: inaccurate/outdated
- Sprockets: manifest.js
- good question
- I noticed this too
- undocumented change (missing from changelog)
- issues: for improving documentation
- need better documentation
- sprockets
- issues: excellent
Annotators
URL
-
-
-
If the bug is still there I think that it is better if it is open so others can find it if they run into the same issue.
-
Closing this because it's obviously not going to get fixed and it's cluttering my open issues
-
-
github.com github.com
-
To achieve this, we created a small Compressor which wraps the Uglifier compressor and links the source maps so they are written to disk.
-
Here's the four case: foo.js Load/Require dependencies Concatenate dependencies foo.js.map Load foo.js Currently grabs metadata[:map] from asset to build an asset, need to move that generation somewhere else to accomplish de-coupling map generation foo.debug.js Load foo.js Load foo.js.map Add comment to end of foo.js with path to foo.js.map foo.source.js The raw file on disk, the map file will need to point to source files.
-
Now I just need to figure out how to decouple this ball of mud
-
The way we do it currently is by calling load from inside of load, via different "pipelines" and processors which is quite elegant and completely impossible to work with.
-
Certainly appreciate the work you've done!
-
If I can find some time, maybe I can help pitch in somehow.
-
I'm kinda stuck at the moment, going around in circles. Everything is really heavily coupled. I would like to get to the point where no load is called from within processors, but i'm not sure if that's possible. Currently the API and the caching strategies are fighting me at every step of the way. I have a branch where i'm hacking through some refactoring, no light at the end of the tunnel yet though :(
-
That should work, but it's a non-trivial change.
-
For the $$$ question, nothing comes to mind. These problems i'm hitting up against are larger than a contractor could solve in a few hours of work (which would be hundreds/thousands of dollars).
-
Right now major changes require a deep and broad understanding of the codebase and how things get done.
-
If a company really wanted to invest, I would prefer they dedicated an employee for X hours a week for Y months than money.
-
Money could be good if it is spent to provide some of the above things. Money on it's own is hard because then it means I would have to spend time book-keeping and managing instead of programming.
-
Triaging issues, reproducing bugs, fixing reported bugs are all helpful.
-
Yeah, can we pay money to make this go faster? Serious question.
-
I think that's fine, but I also don't particularly care about @mikeycgto's desire to not have the linking comment be present in the minified JS.
-
Progress is slow though. I want to change how assets are loaded, the current implementation of "pipelines" is challenging to work with.
-
Our team is also looking into generating source maps in production/staging for error reporting (via Airbrake).
-
I want source map in prod too (for error tracking, same as @vincentwoo)
-
Could you explain your use case in a bit more detail? How are you using source maps without source map comments? Are you uploading them to a bug tracker?
Tags
- open-source software: funding
- receiving money: is it worth the hassle/responsibility of bookkeeping?
- system architecture/design diagram/illustration
- hard/costly to change later
- take my money
- requires a big/non-trivial refactoring/rewrite
- contributing: fixing bugs
- help them help you
- source maps
- hard to understand
- having a deep understanding of something
- elegant solution
- work: doing what you love
- good point
- error reporting in production
- workaround
- good explanation
- annotation meta: may need new tag
- sprockets
- contributing
- boring
- appreciation
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- big refactoring/rewrite
- helping
- open-source software: progress seems slow
- would prefer _ over _
- too coupled/dependent
- what is important/necessary for one person may not be for another
- issue triaging
- doing what you love: leaving what's boring to you for others
- pipeline
- contributing: offering to help
- refactoring: decoupling
- seemingly contradictory
- please elaborate
- complicated/intricate
- complicated
- difficult/hard problem
- unfun
- bookkeeping
- requires a non-trivial change
- fun wording
- source maps: using in production
- hard to follow/read/understand
- decoupled
Annotators
URL
-
-
github.com github.com
-
richard.schneeman+no-recruiters@gmail.com
-
Married to Ruby, literally.
Is his wife's name Ruby?
-
Puma core. Sprockets Core. Top 50 Rails contributors. Married to Ruby, literally.
-
-
docs.sentry.io docs.sentry.io
-
Sentry supports un-minifying JavaScript via Source Maps. This lets you view source code context obtained from stack traces in their original untransformed form, which is particularly useful for debugging minified code (e.g. UglifyJS), or transpiled code from a higher-level language (e.g. TypeScript, ES6).
-
-
en.wikipedia.org en.wikipedia.org
-
-
Abbreviations used in bookkeeping
so inconsistent!
PL – Profit and loss; (or I/S – income statement) P/R - Payroll etc.
-
-
en.wikipedia.org en.wikipedia.org
-
The term taxon was first used in 1926 by Adolf Meyer-Abich for animal groups, as a backformation from the word Taxonomy
Tags
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
Accounting or Accountancy is the measurement, processing, and communication of financial and non financial information about economic entities[1][2] such as businesses and corporations. Accounting, which has been called the "language of business",[3] measures the results of an organization's economic activities and conveys this information to a variety of users, including investors, creditors, management, and regulators.
-
The terms "accounting" and "financial reporting" are often used as synonyms.
-
The recording of financial transactions, so that summaries of the financials may be presented in financial reports, is known as bookkeeping, of which double-entry bookkeeping is the most common system.
-
-
github.com github.com
-
still compiles everything into single CSS/JS files
I noticed this too
-
Reopening #162
https://github.com/rails/sprockets/issues/162 was already closed as duplicated (so this just creates another duplicate).
Technically this could be added there.
Oh, I see, it was from so long ago (2015), that it would probably be frowned upon to reopen such an old issue.
-
Yes, it's true that it returns a single file, but with the more robust caching in 4.0 it works well enough in my experience.
-
The semantic has changed a bit as far as I understand. You need to select a pipeline in debug mode.
-
In order to move forwards with this issue I'll need an example app that reproduces the behavior (https://www.codetriage.com/example_app).
Tags
- when to create new issue/question vs. add additional details/variant to existing
- good enough
- providing an example app (minimal reproducible example)
- issues: reopening
- I have this problem too
- semantic meaning
- sprockets
- why?
- breaking change
- necroposting (posting to a long-inactive discussion thread)
Annotators
URL
-
-
-
let me know if you've got more issues (by opening a new issue)
-
it's super hard to test master because i have no idea which gems need to be updated. is there a guide on how to take a rails 4.2 project to master sprockets without everything mysteriously exploding? ill try to make a repro case but its hard to tell where to even start
-
There's no release of sprockets 4 so there's nothing to revert. Master branch is a WIP. I would recommend using Sprockets 3.
-
Source maps are on my radar, but i'm playing catchup. See: #124 (comment) for a rundown of where we are right now. Source maps are a pretty big project, it's not li
-
I'm trying to get official time at work to dedicate to source maps, and haven't made much progress there.
-
But we're definitely sticking with the source map idea rather than the current (Rails 3/4) behavior of including all JS and CSS files separately while in development?
-
Still broken, @cannikin. Nobody's on board to investigate, much less fix it. Please do dig in
-
Any updates on this one? It makes debugging JS and CSS in the web inspector next to impossible when you can't get any help finding the offending code in your own source files.
Tags
- please open a new issue for this
- source maps
- harder than it should be
- good point
- change of behavior (software)
- finding time for open-source projects
- master branch: is work-in-progress/development/unreleased version
- big project/job/task
- hard to figure out where the problem lies / how to solve the problem / where to even begin
- open-source software: progress seems slow
Annotators
URL
-
-
github.com github.com
-
Cross-posted to https://stackoverflow.com/questions/58632880/error-while-fetching-an-original-source-in-new-rails-app-sprockets-4-firefox, in hopes of reaching more people.
-
-
-
Sprockets 4.0 treats the ".js.erb" as the extension now. There's no mime type registered to that extension. You need to do: register_mime_type 'application/javascript+ruby', extensions: ['.js.erb']
-
-
opalrb.com opalrb.com
-
Opal is a Ruby to JavaScript source-to-source compiler. It comes packed with the Ruby corelib you know and love. It is both fast as a runtime and small in its footprint.
-
-
hyperstack.org hyperstack.org
-
Notice that the HTML elements (BUTTON, DIV, etc.) are in CAPS. We know this is bending the standard Ruby style rules slightly, but we think it reads better this way.
-
-
n this example, we are calling a function on FaaStRuby which is a new serverless platform built for Ruby developers.
-
we used `backticks` to jump into native Javascript to use moment.js
In regular Ruby, `` executes in a shell, but obviously there is no shell of that sort in JS, so it makes sense that they could (and should) repurpose that syntax for something that makes sense in context of JS -- like running native JavaScript -- prefect!
-
Hyperstack gives you full access to the entire universe of JavaScript libraries and components directly within your Ruby code.Everything you can do in JavaScript is simple to do in Ruby; this includes passing parameters between Ruby and JavaScript and even passing Ruby methods as JavaScript callbacks.There is no need to learn JavaScript, all you need to understand is how to bridge between JS and Ruby.
-
Think JavaScript is your only option for the front-end? Think again. Hyperstack is a Ruby DSL, compiled by Opal, bundled by Webpack, powered by React.
Tags
- good translation/replacement/analogue
- good idea
- software stack
- unfortunate
- hard to believe
- JavaScript
- serverless
- sounds too good to be true
- Ruby DSLs
- letter case: all capitals
- Ruby
- Hyperstack
- good analogy
- JavaScript transpiler
- repurpose
- Opal
- React
- unconventional
- annotation meta: may need new tag
- faastRuby
Annotators
URL
-
-
en.wikipedia.org en.wikipedia.org
-
multi-paradigm: functional, imperative
-
-
faastruby.io faastruby.io
-
I decided a couple of months ago to look for a way to work on faastRuby full time. Today is October 1st, 2019, and I am excited to announce that I am bringing faastRuby into Shopify. As I start this next chapter, I will be taking down all faastRuby servers.
-
I decided a couple of months ago to look for a way to work on faastRuby full time. Today is October 1st, 2019, and I am excited to announce that I am bringing faastRuby into Shopify.
-
What happens to my functions? I encourage you to migrate your workloads to OpenFaaS.
-
On the “lows” side, I’d say the worst thing was the impact of not being present enough for my family. I was working a full-time job and doing faastRuby on nights and weekends. Here I want to give a big shout out to my wife. She supported me through this and didn’t cut my head off in the process.
-
One day last August 2018, I stumbled upon an online petition that sparked my curiosity - We Want Serverless Ruby. At that time, none of the major cloud providers had first-class support for Ruby in their serverless products. There were ~1400 devs signing that petition, and I wondered if there was something about Ruby that made it unsuitable for FaaS. I decided to roll the sleeves and start building what would be the first PoC of faastRuby.
-
-
docs.openfaas.com docs.openfaas.com
-
The core of OpenFaaS is an independent open-source project originally created by Alex Ellis in 2016. It is now being built and shaped by a growing community of contributors and end-users.
-
OpenFaaS is hosted by OpenFaaS Ltd (registration: 11076587), a company which also offers commercial services, homepage sponsorships, and support.
-
OpenFaaS® makes it easy for developers to deploy event-driven functions and microservices to Kubernetes without repetitive, boiler-plate coding.
-
-
github.com github.com
-
en.wikipedia.org en.wikipedia.org
-
Emscripten is an LLVM/Clang-based compiler that compiles C and C++ source code to WebAssembly
-
The Unity, Godot, and Unreal game engines provide an export option to HTML5, utilizing Emscripten.
-
-
en.wikipedia.org en.wikipedia.org
-
Examples include Closure Compiler, CoffeeScript, Dart, Haxe, TypeScript and Emscripten.
-
A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler[1] is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent source code in the same or a different programming language.
-
-
www.codetriage.com www.codetriage.com
-
Better yet, send them a link to this page to help them understand why and how to make an example app:
-
If you end up finding and fixing a bug in your code, consider re-reading the documentation and seeing if that behavior of the library is unclear. Consider sending a documentation PR.
-
If you want the issue fixed as fast as possible, then you should try to help the maintainers as much as possible. Make an example app! Even if it takes extra time for you, it will ultimately lead to your issues getting fixed faster.
-
Finally: Give a link to the example app to a maintainer (usually through an issue).
-
An example app is an application that is designed to reproduce a bug or demonstrate an issue.
-
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?
Tags
- minimal reproducible example
- providing an example app (minimal reproducible example)
- answer the "how?"
- valuing people's time
- opportunity to improve/fix something
- a dedicated page for an issue/convention/recommendation that you can easily link to / share with others
- avoid wasting maintainers' time so they have more time to work on important things
- wasteful/inefficient use of resources
- help them help you
- good explanation
Annotators
URL
-
-
math.stackexchange.com math.stackexchange.com
-
What is the difference between equation and formula?
-
I'd say an equation is anything with an equals sign in it; a formula is an equation of the form A= stuffA= stuffA={\rm\ stuff} where AAA does not appear among the stuff on the right side.
-
I think that over time the distinction is lost. My math teacher, 35 years ago stated "formulas are used in chemistry, in math we have equations". To this day, the word 'formula' in math seems wrong, but I'd accept it's used commonly.
-
An equation is meant to be solved, that is, there are some unknowns. A formula is meant to be evaluated, that is, you replace all variables in it with values and get the value of the formula.
-
The key idea is that the equation captures not just the ingredients of the formula, but also the relationship between the different ingredients.
-
In your case, "mpg = distance/gallons" is best understood as "a formula in the form of an equation", which means that in this instance the two words are interchangeable.
-
An equation is any expression with an equals sign, so your example is by definition an equation. Equations appear frequently in mathematics because mathematicians love to use equal signs. A formula is a set of instructions for creating a desired result. Non-mathematical examples include such things as chemical formulas (two H and one O make H2O), or the formula for Coca-Cola (which is just a list of ingredients). You can argue that these examples are not equations, in the sense that hydrogen and oxygen are not "equal" to water, yet you can use them to make water.
-
-
-
Using these attributes will show validation errors, or limit what the user can enter into an <input>.
-
Rails still encourages you to dump all validation errors at the top of a form, which is lulzy in this age of touchy UX
-
-
-
-
Last week, I shared how to check if an input is empty with CSS. Today, let’s talk about the same thing, but with JavaScript.
-
We don’t want to invalidate the input if the user removes all text. They may need a moment to think, but the invalidated state sets off an unnecessary alarm.
-
-
stackoverflow.com stackoverflow.com
-
The valueAsNumber IDL attribute represents the value of the element, interpreted as a number. On getting, if the valueAsNumber attribute does not apply, as defined for the input element's type attribute's current state, then return a Not-a-Number (NaN) value.
-
Your expectations are reasonable considering the property name, but
-
-
stackoverflow.com stackoverflow.com
-
The :empty selector refers only to child nodes, not input values. [value=""] does work; but only for the initial state. This is because a node's value attribute (that CSS sees), is not the same as the node's value property (Changed by the user or DOM javascript, and submitted as form data).
-
If you would like to make “empty” include values that consist of spaces only, you can add the attribute pattern=.*\S.*.
-
You can use the :placeholder-shown pseudo class. Technically a placeholder is required, but you can use a space instead.
-
Semantically this is wrong.
-
There is (currently) no CSS selector for detecting directly whether an input control has a nonempty value, so we need to do it indirectly, as described above.
-
Generally, CSS selectors refer to markup or, in some cases, to element properties as set with scripting (client-side JavaScript), rather than user actions. For example, :empty matches element with empty content in markup; all input elements are unavoidably empty in this sense. The selector [value=""] tests whether the element has the value attribute in markup and has the empty string as its value. And :checked and :indeterminate are similar things. They are not affected by actual user input.
-
The selector [value=""] tests whether the element has the value attribute in markup and has the empty string as its value.
Tags
- semantically correct
- missing feature
- good example
- limitations leading to workarounds
- HTML: constraint validation
- not:
- CSS: selectors
- CSS: pseudo class
- HTML
- important point
- important distinction
- CSS
- missing feature leading to less-than-ideal workarounds
- DOM: properties vs. attributes
- good explanation
- HTML: constraint validation: pattern
Annotators
URL
-
-
feedback.dekudeals.com feedback.dekudeals.com
Tags
Annotators
URL
-
-
store.steampowered.com store.steampowered.com
-
One word for each aspect of this game. Story - N/A.Gameplay - Excellent.Graphics - Minimal.Sound - Splendid.Music - Elegant.Overall - Delightful.
-
-
store.steampowered.com store.steampowered.com
-
If you plan on using a gamepad with big picture mode I made a config that works perfectly so check it out.
-
There are myriads of platformers around, it's an oversaturated market, and just like industrial designer Karim Rashid said about there being no excuse by this point to make an uncomfortable chair, there's no excuse by this point to make a boring patformer.
-
-
css-tricks.com css-tricks.com
-
Positively indicate valid input values Let users know a field has been entered correctly. The browser can give us this information through the :valid CSS selector:
-
-
it does require some CSS trickery to get everything just right
-
Assuming wonderful support, this is how the logic would play out…
-
But there doesn’t appear to be a simple way to test for :placeholder-shown.
-
You can’t use @supports for selectors, only property/values (e.g. @supports (display: flex))
first sighting CSS: @supports
-
We’re not really using placeholder in our demo, but a value of a single space works:
-
:placeholder-shown is super useful for us here! It’s basically the secret selector for testing if an input currently has a value or not.
-
You’d think :empty would be it, but it’s not. That’s for matching things like <p></p>… container elements with nothing inside them. Inputs are no-content elements already.
-
Sub trick!
-
You don’t need to do any tricky cursor stuff, because it’s all semantically wired up already.
-
always use real <label for="correct_input"> elements. Just that alone is a UX consideration all too many forms fail on
-
Placeholders are suggestions for valid input, like putting “Tulsa” in an input labeled “City”.
-
I’d say if the form is short and an obvious pattern (like sign up or log in), you could use the placeholder visual pattern, but use real labels instead.
-
If they click the area taken up by the label, it will activate the input. If they click the input, it will activate the input. Both correct.
-
You can do and impressive amount of form validation with just HTML attributes. You can make the user experience pretty clean and clear with CSS selectors.
Tags
- semantically correct
- missing feature
- definition
- advantages/merits/pros
- limitations leading to workarounds
- distinction
- first sighting
- easy to confuse (mix up)
- CSS: @supports
- form design: validation feedback
- taken to its logical conclusion
- semantic markup
- HTML: label
- clever
- recommended option/alternative
- form design: validation error display
- fun wording
- tutorial
- it's just plain/pure HTML/CSS
- explanation
- CSS
- UI: labels
- how to do it correctly and avoid common mistakes/pitfalls
- best practices
- clever solution
- tricky
- excellent technical writing
- trickery
- forms
- easy to falsely assume
- feature detection
- subitem/subcase/subcategory/subheading
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
When you code in a semantic way, you basically give meaning to the data you're describing.
-
Usually when people are talking about code being semantically correct, they're referring to the code that accurately describes something.
-
HTML elements have meaning. "Semantically correct" means that your elements mean what they are supposed to.
-
Semantically correct usage of elements means that you use them for what they are meant to be used for.
-
It means that you're calling something what it actually is.
-
Another example: a list (<ul> or <ol>) should generally be used to group similar items (<li>). You could use a div for the group and a <span> for each item, and style each span to be on a separate line with a bullet point, and it might look the way you want. But "this is a list" conveys more information.
-
The classic example is that if something is a table, it should contain rows and columns of data. To use that for layout is semantically incorrect - you're saying "this is a table" when it's not.
-
Browsers can correctly apply your CSS (Cascading Style Sheets), describing how each type of content should look. You can offer alternative styles, or users can use their own; as long as you've labeled your elements semantically, rules like "I want headlines to be huge" will be usable.
-
Screen readers for the blind can help them fill out a form more easily if the logical sections are broken into fieldsets with one legend for each one. A blind user can hear the legend text and decide, "oh, I can skip this section," just as a sighted user might do by reading it.
-
Mobile phones can switch to a numeric keyboard when they see a form input of type="tel" (for telephone numbers).
-
Knowing what your elements are lets browsers use sensible defaults for how they should look and behave. This means you have less customization work to do and are more likely to get consistent results in different browsers.
-
All of this semantic labeling helps machines parse your content, which helps users.
-
-
Fits the ideal behind HTML HTML stands for "HyperText Markup Language"; its purpose is to mark up, or label, your content. The more accurately you mark it up, the better. New elements are being introduced in HTML5 to more accurately label common web page parts, such as headers and footers.
-
Yes, but honestly, and no offense intended, but I don't see the harm in these type questions, nor why some people are offended when they are asked. If I owed a website, I wouldn't mind it because it just creates more pages that can be indexed. I see it as helping the website. But, I did look and didn't see a simple answer. Again, no offense is intended. I've just never understood the complaints.
Tags
- web: accessibility
- semantically correct
- semantic meaning
- definition
- advantages/merits/pros
- good example
- why are people bothered/offended by this?
- use meaningful names (programming)
- consistency across all platforms
- calling something what it actually is (semantic labeling)
- semantic markup
- explicit meaning
- reasonable defaults
- fundamental principles/paradigm of the Web
- good point
- explanation
- be specific
- politeness
- duplicate question/issue/post
- simple explanation
- good explanation
- what's wrong with _?
- example
- conveys more information (semantic)
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
Currently, there is no way to style those little validation tooltips.
-
-
tylergaw.com tylergaw.com
-
Brass tacks:
-
Demos; Style 01, Style 02, Style 03 and the code.
-
-
tylergaw.com tylergaw.com
-
The source for all versions is available on GitHub.
-
My collection (this isn’t all of it) grows at a comical pace.
-
Having them in a physical form is good for my soul.
-
This is a non-exhaustive list of other things I love;
-
Spending an hour digging through bins in a record store is one of my favorite ways to clear my head. And then spend too much money.
-