Don't worry this isn't a concerted effort to actually block things. Its a pretty weak effort to go through the motions.
If your tuned into this debate at a federal level there are a vocal bunch of senators bemoaning the Australia tax that our geography puts on us. These guys put out info on how to use vpns and avoid geoblocking and such for the masses.
Best in show example: Adobe software and Game of thrones.
Australians want to work, trade and play in the free first world. And until we get that we'll steal everything that isn't nailed down.
Can someone confirm that this actually works? Seems like a pretty weak attempt at a block if true. I think the real problem is them sniffing your traffic.
> I wish iOS allowed you to change DNS for celluar networks.
Confirm, it's just a DNS block like previous attempts by the AU Gov to block stuff.
If you're on a Apple device you probably need to use VPN to specify an alternate DNS and either route your traffic through that VPN as well or just use it for DNS.
So it is being blocked at ISP level, and it's up to them how they implement the block. For now, they've chosen DNS blocking, which is of course easy to work around.
Here's hoping the block encourages everyday citizens to be take technical measures to evade not just the block but the censorship.
The simpler implementation might indicate that the rax developers are trimming overcomplicated bloat, or culling features that don't align with specific needs of Alibaba. Or maybe they're just removing code they don't yet understand the necessity for. It's not immediately clear what tradeoffs each are making, but having rax audit what's really necessary could be a good thing for everyone.
Looks like the Rax version is based on React-Redux 4.x, which was was primarily a single file and kept most of the logic in a React component. React-Redux v5 is a complete internal rewrite that pushes the logic out into memoized selector functions.
In fact, it appears to be 98%-ish the same as React-Redux v4.4.6. They've added semicolons, swapped out the React imports for Rax imports, and shuffled the order of some of the methods, but the code is effectively identical.
react-redux is definitely super bloated right now. It's packed full with method overloads (that are super confusing if you read their definitions in the doc as opposed to looking at examples), and performance optimizations that involve looking at the function arguments, memorization, etc.
It's cool and needed to cover all of the cases and edge cases, but it's easy to see how, if you don't need that stuff, it can be reimplemented in a fraction of the code.
For data that's mostly to do with the the API provided by the particular mongodb driver, than mongodb itself. Mongo stores and transmits BSON, not JSON. Most mongo drivers expose an API that serialises your data to BSON for writes and wraps the BSON data with a JSON-like interface for reads.
These components look and work great, but unfortunately are a real headache to retheme unless you want to pull in a sass/less toolchain in addition to what you're currently using. This is a pain in the ass if you already have your theme variables set up in one compiles-to-CSS language.
There is a standard for CSS variables and a very functional subset of their functionality can be compiled for older browsers at build time: http://cssnext.io, yet as far as I can tell, all of these component frameworks impose some other nonstandard compiles-to-CSS language or one of many possible APIs for writing inline styles.
Inline styles seem to be a trend at the moment but I can only assume the people driving this movement haven't had the experience of working with 3rd party components (which you may or may not have the source for) and needing to alter something the designers didn't expose and simply having no simple options because the damn inline style can't be overridden even by !important. Now you've got to fork whole the f'ing component, possibly multiple, each of which potentially coming with yet another different compiles-to-CSS toolchain all because you wanted to add a single line of CSS.
Admittedly, antd doesn't use inline styles si the above doesn't apply here, but having to maintain a custom builder for antd in order to change some fonts and a few colors was a frustrating experience. Not sure what a good solution is until CSS variables get more browser adoption, but it'd be great if we could collectively start standardizing on standards.
Theming is on of the big reasons we saw the need to make styled-components[0] (new lib to style React apps and component libraries)
I'm one of the maintainers of ElementalUI, and Glen Maddern, the styled-components co-creator, one of the creators of CSS Modules. One of the biggest downsides of CSS Modules (and, by extension, every other styles in JavaScript library right now) is that theming is simply impossible. Building third-party component libraries is hard enough, but providing an easy-to-theme API wasn't a solved problem in the React world. Nobody has done it properly, and there is no agreed-upon way of doing this!
styled-components has built-in theming support[1] to solve this exact problem. (note: this is CSS-in-JS, not inline styles[2], so overriding is easy as pie too[3]) We're rebuilding ElementalUI with it right now and the next versions of react-toolbox and Belle will be built with it as well.
We also have ReactNative support, which nobody else has done before. Just because you're writing a universal React app with a third-party component library shouldn't mean switching between three or four different APIs to style your app. With styled-components, you can just use styled-components no matter what you're styling!
(If you're reading this, I'd love to have a chat with the Antd people about maybe moving to styled-components! You can reach me on Twitter at @mxstbr, just ping me there!)
I've been using Antd components for the last year in some my project. All components are also available here[0] as single modules for better reusability and customization.
Currently, I have solved all my theming goals with Plain CSS. For each component, that I'd like to customize I created a wrapper
import Slider from 'rc-slider';
function StyledSlider(props) {
return <Slider className="my-slider" {...props} />
}
(This is a very simplified example, just shows the way).
I have read about styled-components, but I don't understand how it would help me with theming. I don't think that rewriting every component from LESS to styled-components to make possible to use ThemeProvider will be an option because it doesn't give you any benefits comparing with customization guide[1], that also gives you good enough way to override defaults.
The TL;DR is that this customization guide will suddenly become really easy. Antd can specify a default theme and users can override the parts of the default theme they want!
All the user has to do is pass a single prop to the ThemeProvier and override what they want:
On top of that different parts of your app can have different themes. Making your sidebar dark but your main component light is not an issue – just wrap them in two ThemeProviders with different themes:
It's also all dynamic, meaning you can let the users of your app provide custom themes for your app and it'll automatically apply.
Compare that with the current customization guide, not only do users have to use webpack, they also have to use specific plugins just to make customization of third-party components work! It's also all global, which means styling the sidebar dark and the main area light is impossible since it's all just Less variables applied at build time. This also makes it very hard to have user supplied themes.
Does that make it clear enough how using styled-components would help with theming? :-)
The ability to apply different overrides for some branches in a component tree is powerful. Sure, I will come back to styled-components when I will get that issue.
Currently, I (as well as most users, I suppose) just need to apply some global color overrides to match with company's brand guidelines that I can solve it with old good plain CSS.
Also, for big projects, like Antd, transition to some other CSS-tooling almost impossible, because CSS/LESS code is spread across several repositories and will take a lot of efforts and time.
And finally, the current implementation is better because it doesn't mention styles in Javascript at all, so the library users are able to choose any way to style components without extra efforts from the side of library authors.
You can choose to style styled components any way you want too! You can pass in class names, inline styles, whatever you want just works. No need to be aware of styled-components from the user side at all.
Imagine Button being a styled component, all of the usual methods work perfectly fine:
You say "just" apply some global color overrides, but to "just" apply some global color overrides you need to use webpack (using another bundler? Sorry, antd is not for you) and use atool-build or have to configure webpack to work the way they need it to.
Or you create a custom less file, but that means you'll load all the styling for all components even though you really only wanted to use e.g. the Button.
That's not really "just" overriding a global color, is it? ;-)
I'm not saying this is a trivial change at all by the way, I understand the cost of it since I'm doing it for ElementalUI. I don't know if the antd maitainers will consider it worth it, that's another discussion.
A big issue I see with CSS-in-JS at this moment is server-side-rendering and caching. You started working on a babel-transform for extracting static styles but seem to have changed your mind about actually extracting that to a css-file[1]. Requiring a JS-parser to apply the styles is the wrong approach but might be a stepping stone as it's probably an easier problem to solve. Separating JS and CSS should improve performance somewhat as the browsers can run the scripting and styling engine separately. In the end I'd like a transformation that creates one CSS-file per JS-file so that common chunks can be combined by webpack, gaining high cache hit percentage on sites that uses reloads. Transformations should also be applied to the JS so that SSR doesn't have to calculate styles each time.
I think the work you are doing right can be a stepping stone for something great! The advantages of more traditional methods of creating CSS are ahead-of-time-compilation, splitting/bundling (combine common chunks to achieve low cache invalidation, low transfer size, and high cache hits with few files), and no waiting for the JS-engine to parse and convert your internal data structure.
SPA-SSR is in general a lot more CPU-heavy than the more traditional approach of instantiating templates. We need to find ways of minimising the redundant calculations performed by the server to regain the performance we lost in the transition from templates to SPA-SSR. A source code transformation that extracts CSS and removes static JS is one such step.
The SSR API is a good start but completely trashes cache + creates a large .html each time you reload. The .html returned can most often not be cached so we should strive to minimise its size. The problem of caching/minimising server load is not the easiest to solve but we should be long on our way if we can analyse/signal what parts are static and which are dynamic.
It is not a headache to retheme them. It is pretty easy, the easiest i've seen in a UI kit. You have style and classname overrides in place, scoped css classnames and LESS.
If you use a CSS react-lib like React-CSJS, styling this is easy as pie.
Theming is a difficult problem. Each component has a couple of visual properties which may depend on the state (hover, focus, error, internal variable). Having a separate variable for each visual property would be a nightmare.
You can separate component Style into - BASE + States classes.
classnames[0] can used to use multiple classes, the classes can be activated using component state. This provides a viable solution for Structure & Style.
This is useful for structuring components internally, but sadly doesn't help solve the theming issue at all :-(
What you want from theming is a global skin. You want users of your component library to be able to say "I want all of my buttons to be red" without having to wrap the component or pass a prop to every component. (simplified example)
Doing so just with class names is very very hard. It's what we've done for ElementalUI (together with Less), but it just doesn't work – it's a pita for users!
SCSS (and to a lesser degree LESS) are basically industry standard now, if you are using react, you are almost certainly using one of the two preprocessors.
I don't think your complaint is relevant here, especially since you provide no solution.
It bothers me that this reply is at the top of the comments.
The argument about inline styles is valid, in my opinion. I've had to fork and keep updating from upstream several react components for the exact same reason.
I don't really see much of a need for preprocessors w/ css modules, post css, css in js, etc. It seems like preprocessors are becoming less popular, not more.
I fail to understand this criticism. React Components expose a class hierarchy which can be namespaced well by their designers (if Antd isn't already doing this). Extending / theming with your specific CSS pre-processor is then pretty straightforward.
Doing it this way requires overriding every single built-in rule that uses the property you're trying to override… including states like :hover, :before, :disabled, :disabled and :hover, etc which can be easy to miss.
I've had some success with simple find & replace preprocessor but this gets complicated if the CSS uses colour manipulation functions e.g.
color: color(var(--color-base) tint(50%)), then you're basically going to be re-implementing their whole stylesheet again.
Also, good luck making sure everything still works if and when the components are updated.
Ideally, you alter theme variables in one place, rather than finding and overriding them everywhere they're applied.
no, it just installs everything it can into the top level node_modules. npm@2 would do this to a degree as well, it was just less sophisticated about it.
If I take the normal dose of >3mg, I'll experience incredible irritability the following day. I become sensitive to sound and anything that isn't entirely perfect. Things make me feel unreasonably furious. This is bad. These days I always microdose melatonin.
If I don't fall asleep with the first tiredness crash that happens 20-30 minutes after taking melatonin, I find myself restless and unable to sleep for another 4 or 5 hours. The more melatonin I take, the more intense the initial crash will be, but the harder it is to sleep if I miss that crash.
If only the government was equally motivated to remedy injustices incurred by those who aren't already filthy rich.