UNPKG

33.4 kBMarkdownView Raw
1## [2.0.2]
2
3- Due to deprecation, `postcss-cssnext` has been replaced with `postcss-preset-env`.
4
5- `extract-css-vars.js` script has been deprecated in favor of ['importFrom'](https://github.com/csstools/postcss-preset-env#importfrom) option of postcss-preset-env. Please consider using the same approach in your project.
6
7## [2.0.0]
8
9- Versions of dependencies are now prepended with a caret (`^`) rather than fixed
10- \[Breaking\] `@jetbrains/icons` was updated to `3.0.0` which includes a major rework of icons' shapes and dimensions.
11
12 `size`, `width` and `height` props are deprecated in the `Icon` component. The intrinsic size of the icon (`width` and `height` SVG attributes) is used instead.
13
14 We strongly recommend to use icons handcrafted for particular sizes. If an icon doesn't exist in the desired size, please ask your designer to draw one. "Responsive" checkmark should be unchecked when exporting an icon.
15
16 If you're using your own instance of `svg-inline-loader` make sure to pass `options: {removeSVGTagAttrs: false}` to avoid removing `width` and `height` attributes.
17
18- \[Breaking\] Icons are now aligned to the text baseline out of the box (only when using the following icon sizes: 10px, 14px, 16px, 20px). Previously, `vertical-align: middle;` was used by default which was not great as it required fine-tuning almost every time to achieve perfect alignment. If you have such compensations in your code, please inspect and remove them.
19
20- \[Breaking\] SVG icons are not inlined anymore – Icon and IconNg components don't support sprite IDs. If you are patching svgSpriteLoader, replace `"svgSpriteLoader.include.push(...)"` with `"svgInlineLoader.include.push(...)"`. See [this issue](https://youtrack.jetbrains.com/issue/RG-1646) for details.
21
22- \[Breaking\] Some deprecated SASS files were [removed](https://github.com/JetBrains/ring-ui/commit/b174d82d5c683ebd8716524c8affc880adc7460e): `button.scss`, `icon.scss`, `loader-inline__legacy.scss`.
23
24- \[Breaking\] Some deprecated SASS constants (like `$ring-text-color`) were [removed](https://github.com/JetBrains/ring-ui/commit/4ec18fa1bbd5e069e1e357246893a8511501237a).
25
26## [1.0.0]
27
28- \[Breaking\] New visual language. Most UI components have received significant updates which may require you to update the rest of your application's UI.
29
30- Many components now have a `theme` property that toggles the component's appearance to better fit dark and light backgrounds.
31
32- \[Breaking\] The styles of many components were rewritten from SASS to CSS modules. If you were importing the SASS files directly, you will have to remove those imports and use the corresponding components instead. The complete list of removed SASS files:
33
34 ```
35 badge.scss, button-group.scss, button-toolbar.scss, checkbox.scss, link.scss, list.scss,
36 loader.scss, old-browsers-message.scss, popup.scss, query-assist.scss, radio.scss,
37 select-popup.scss, select.scss, tabs.css, tag.scss, tags-input.scss, tooltip.scss
38 ```
39
40- \[Breaking\] SASS and `postcss-modules-values-replace` variables were deprecated, CSS custom properties must be used instead. In order to use CSS custom properties in your app, you will need to configure PostCSS as follows:
41 ```
42 plugins: [
43 ...
44 require('postcss-custom-properties')({
45 preserve: true,
46 variables: require('@jetbrains/ring-ui/extract-css-vars')
47 })
48 ]
49 ```
50
51- Babel 7 was introduced.
52
53- The default font-family declaration was changed. Notably, it may now fall back to Segoe UI instead of Helvetica Neue on Windows.
54
55## [0.4.6] — 28-12-2017
56
57- `ErrorBubble` component was reimplemented using `Popup`. While the API did not change, the implementation has changed drastically. If you were relying on the internals (to customize CSS, for example) please review your implementation.
58
59## [0.4.0] — 18-12-2017
60
61- `react-markdown` package was updated to version 3.0 which contains breaking changes. Since the `Markdown` component passes props to `react-markdown`, this constitutes a breaking change for Ring UI itself. See the [details](https://github.com/rexxars/react-markdown/blob/master/CHANGELOG.md#300---2017-11-20).
62
63- [dependencies.io](https://www.dependencies.io/) was set up to help us keep dependencies up-to-date. Most dependencies were updated to latest versions.
64
65## [0.3.8] — 29-11-2017
66
67### Auth improvements
68- Embedded login flow is now supported: instead of redirecting to and from Hub to perform authentication, a login form can now be opened in a separate window. Upon successful authentication the service may choose to either reload the page or to partially update the UI without reloading, which results in a more pleasant login experience for the users. To enable the new mode, pass `embeddedLogin: true` to Auth configuration. There's also a new `enableBackendStatusCheck` option that checks if Hub is up and running before opening the login window or making the redirect. This option is enabled by default.
69
70## [0.3.0] — 20-11-2017
71### Breaking
72- Release 0.3.0 is designed to work with React 16. Moreover, `react` and `react-dom` are no longer `dependencies` but `peerDependencies` — make sure to include them in your project's `dependencies`, if you don't have them already. If your project's `webpack.config.js` includes a `resolve` section for making sure only one copy of React is loaded, it can now be removed.
73
74- `RingComponent`, a base class for all Ring UI components is now gone. The components are now inherited directly from `PureComponent`. If you have your own components using `RingComponent` as the base class, please refactor them:
75
76 // Before
77 import React from 'react';
78 import RingComponent from '../ring-component/ring-component';
79
80 export default class MyComponent extends RingComponent {
81 ...
82 // RingComponent had its own lifecycle methods, matching the original ones
83 didUpdate(prevProps, prevState) {
84
85 }
86 }
87
88 // After
89 import React, {PureComponent} from 'react';
90
91 export default class MyComponent extends PureComponent {
92 ...
93 componentDidUpdate(prevProps, prevState) {
94
95 }
96 }
97
98- If you were relying on the `rerender` method of `RingComponent` (for example, to trigger re-rendering of `date-picker` or `query-assist`), special wrapped versions of those components should be used instead. Those wrapped versions include the `rerender` method for backward compatibility:
99
100 // Before
101 import DatePicker from "@jetbrains/ring-ui/components/date-picker/date-picker";
102
103 // After
104 import {RerenderableDatePicker as DatePicker} from "@jetbrains/ring-ui/components/date-picker/date-picker";
105
106### Added
107
108- [Hover mode](http://www.jetbrains.org/ring-ui/dropdown.html#Dropdown%20with%20hover%20mode) was added to `Dropdown`. [Review][RING-UI-CR-2998]
109- `user-card` [component](http://www.jetbrains.org/ring-ui/user-card.html) was added. [Review][RING-UI-CR-3016]
110- Support for fuzzy search was added to `Select`, pass `props.filter = { fuzzy: true }` to activate. [Review][RING-UI-CR-3037]
111- `data-list` component [received a major rewrite](http://www.jetbrains.org/ring-ui/data-list.html). [Review][RING-UI-CR-3042]
112
113### Removed
114
115- `React Ng`, a legacy Angular directive for proxying React components was removed.
116- An ability to import SVG icons as components (`import PencilIcon from '@jetbrains/icons/pencil.svg'`) deprecated earlier was removed.
117
118### Internals
119- Updated lots of dependencies
120- `mout` is no longer a dependency
121
122[0.4.6]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.4.5...%40jetbrains/ring-ui%400.4.6
123[0.4.0]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.3.8...9a4e78c2d33ec82fec05f8b5afc14d081d553798
124[0.3.8]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.3.1...%40jetbrains/ring-ui%400.3.8
125[0.3.0]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.2.50...%40jetbrains/ring-ui%400.3.1
126[RING-UI-CR-2998]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2998
127[RING-UI-CR-3016]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-3016
128[RING-UI-CR-3037]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-3037
129[RING-UI-CR-3042]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-3042
130
131## [0.2.10] — 22-08-2017
132### Added
133- `Icon` component now exports icons (`@jetbrains/icons` package) and logos (`@jetbrains/logos`) as React components. A previously introduced feature of importing them directly from packages is deprecated:
134
135 // deprecated, will be removed in 0.3
136 import PencilIcon from '@jetbrains/icons/pencil.svg'
137 import SearchIcon from '@jetbrains/icons/search.svg'
138 import HubLogo from '@jetbrains/logos/hub/hub.svg'
139
140 <PencilIcon/>
141 <SearchIcon/>
142 <HubLogo/>
143
144 // Worked before, works now, and will work later
145 import pencilIcon from '@jetbrains/icons/pencil.svg'
146 import searchIcon from '@jetbrains/icons/search.svg'
147 import hubLogo from '@jetbrains/logos/hub/hub.svg'
148 import Icon from '@jetbrains/components/icon/icon'
149
150 <Icon glyph={pencilIcon}/>
151 <Icon glyph={searchIcon}/>
152 <Icon glyph={hubLogo}/>
153
154 // Works since 0.2.7. This allows to stop patching ring-ui's `svg-sprite-loader` rule in your webpack config.
155 import {PencilIcon, SearchIcon} from '@jetbrains/components/icon'
156 import {HubLogo} from '@jetbrains/components/icon/logos' // This can dramatically increase your bundle size, so you may want to keep using the above traditional method for logos
157
158 <PencilIcon/>
159 <SearchIcon/>
160 <HubLogo/>
161
162 // Also works
163 import Icon, {PencilIcon, SearchIcon} from '@jetbrains/components/icon'
164 import {HubLogo} from '@jetbrains/components/icon/logos'
165
166 <Icon glyph={PencilIcon}/>
167 <Icon glyph={SearchIcon}/>
168 <Icon glyph={HubLogo}/>
169 [Review][RING-UI-CR-2945]
170- `Tag`: `disabled` prop was added. [Review][RING-UI-CR-2951]
171- `Popup`: a custom container can be passed as a prop. [Review][RING-UI-CR-2941]
172- `Dialog`: focus is trapped inside dialog. Tabbing outside of the dialog is blocked.
173You can opt out of this behavior by passing `trapFocus={false}`. [Review][RING-UI-CR-2935]
174
175### Changed
176- `Select`: after selecting a tag, the input is cleared. [Review][RING-UI-CR-2944]
177
178### Fixed
179- "Clear" icon on `Select`'s button was not clickable in Firefox. [Review][RING-UI-CR-2952]
180- `svg-sprite-loader` was updated to fix rendering of logos in Firefox. [Review][RING-UI-CR-2942]
181
182[0.2.10]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.2.1...%40jetbrains/ring-ui%400.2.10
183[RING-UI-CR-2952]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2952
184[RING-UI-CR-2951]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2951
185[RING-UI-CR-2945]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2945
186[RING-UI-CR-2944]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2944
187[RING-UI-CR-2941]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2941
188[RING-UI-CR-2942]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2942
189[RING-UI-CR-2935]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2935
190
191## [0.2.1] — 11-08-2017
192### Fixed
193- Include icon-runtime-generator.js into package
194
195[0.2.1]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.2.0...%40jetbrains/ring-ui%400.2.1
196
197## [0.2.0] — 11-08-2017
198### Added
199- SVG icons can be imported directly as React components. They pass props to the `Icon` component.
200
201 // Before (and still fully supported)
202 import pencilIcon from '@jetbrains/icons/pencil.svg'
203 import Icon from '@jetbrains/components/icon/icon'
204
205 <Icon
206 glyph={pencilIcon}
207 size={Icon.Size.Size12}
208 title="edit"
209 />
210
211 // After
212 import PencilIcon from '@jetbrains/icons/pencil.svg'
213
214 <PencilIcon
215 size={PencilIcon.Size.Size12}
216 title="edit"
217 />
218 [Review][RING-UI-CR-2921]
219- `baseline` option for `Grid` component. [Review][RING-UI-CR-2913]
220
221### Changed
222- `Code` component now comes with a list of highlighed languages. Other languages supported by `highlight.js` can be enabled manually:
223
224 import {highlight} from '@jetbrains/ring-ui/components/code/code'
225 import lang1c from 'highlight.js/lib/languages/1c';
226 highlight.registerLanguage('1c', lang1c);
227 [Review][RING-UI-CR-2914]
228- `DataList` component: "show more / less" functionality was fully rewritten. [Review][RING-UI-CR-2908]
229
230### Fixed
231- `DataList`: fixed the issue with selection and focus being cleared when toggling a tree element. [Review][RING-UI-CR-2903]
232- Various optimizations were applied to reduce app bundle size. [Review][RING-UI-CR-2923]
233
234[0.2.0]: https://upsource.jetbrains.com/ring-ui/compare/%40jetbrains/ring-ui%400.1.2...%40jetbrains/ring-ui%400.2.0
235[RING-UI-CR-2903]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2903
236[RING-UI-CR-2908]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2908
237[RING-UI-CR-2913]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2913
238[RING-UI-CR-2914]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2914
239[RING-UI-CR-2921]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2921
240[RING-UI-CR-2923]: https://upsource.jetbrains.com/ring-ui/review/RING-UI-CR-2923
241
242## 0.1.0 — 01-08-2017: Ring UI goes Open Source!
243
244### What changes for the end users
245- `@jetbrains/ring-ui` package should be used instead of `ring-ui`.
246- Version was reset to `0.1.1`. To install the latest version, run `npm install --save-exact @jetbrains/ring-ui`.
247- You may remove the internal registry line from `.npmrc`.
248- Named imports can be used for importing components:
249 ```js
250 import {Button, Input} from '@jetbrains/ring-ui';
251
252 // You can still import components one by one to reduce bundle size
253 import Button from '@jetbrains/ring-ui/components/button/button';
254 import Input from '@jetbrains/ring-ui/components/input/input';
255 ```
256- Change the webpack configuration import (if using one) from `require('ring-ui')` to `require('@jetbrains/ring-ui')`.
257
258### What changes for the contributors
259- The commit history has been rewritten. Please clone the repository anew from `ssh://github.com/JetBrains/ring-ui.git`.
260- Prepend your commit messages with `[Publish]` to trigger publishing of npm packages.
261
262## Earlier changes
263
264### 27-07-2017: @jetbrains/icons
265
266Private `jetbrains-icons` package was replaced with a public one that is hosted on GitHub and available as `@jetbrains/icons` in npm. Please update your projects accordingly.
267
268### 23-07-2017: borders are used for link underline instead of text-decoration
269
270This allows to put the underline right below the descenders, so that it doesn't cross them, and make it 1 physical pixel wide on retina displays.
271
272If you use some non-textual content along with text inside `Link` component, you may need to pass a function as a child to `Link`, which would take one argument, `WrapText`, and use it to wrap the text parts (see [example with logo](http://ring-ui.github.io/branch/ring-ui-language/link.html#Link)).
273
274Note that `WrapText` relies on the fact that it's an inline element, so if, for example, you use flexbox layout inside `Link`, you may need an additional div around `WrapText`.
275
276### 23-07-2017: react-virtualized
277
278The render optimisation logic in List component is delegated to [react-virtualized]() library. Now it works even if the List doesn't have a `maxHeight` prop. You may still opt out of the optimization by passing `renderOptimization={false}`.
279
280### 06-07-2017: `expect(smth).to` usage is discouraged in favour of `smth.should`
281
282It's not possible to define `should` property on `null` and `undefined` values, so here's a possible workaround:
283```js
284// Before
285expect(foo).to.not.exist;
286expect(foo).to.be.null;
287expect(foo).to.not.undefined;
288
289
290// After
291should.not.exist(foo);
292
293// Or, if you want to be more specific
294(foo === null).should.be.true;
295(foo === undefined).should.be.true;
296```
297
298### 04-07-2017: Ring UI is a monorepo
299
300Run `npm run bootstrap` to install all the packages' dependencies and link them between each other where needed.
301
302### 03-07-2017: `header-legacy` component has been removed
303
304Use `header` component instead
305
306### 24-06-2017: major tests refactoring
307
308#### Enzyme
309Airbnb's [enzyme](http://airbnb.io/enzyme) was introduced as a tool for testing React output. Please refer to its [API docs](http://airbnb.io/enzyme/docs/api/) and to the list of `chai-enzyme` [assertions](https://github.com/producthunt/chai-enzyme#table-of-contents).
310
311##### Which helper should I use?
312When using enzyme, a tough question is which of the `shallow/mount/render` helpers to use. Here's a simple checklist for that.
313
314* Use `shallow` by default. Basically, it just tests the output of your `render` function and often this can be enough
315* Use `mount` when
316 1. some DOM APIs are involved
317 2. testcase relies on `componentDidMount` or refs being called
318 3. testcase uses type and/or props of the component being tested ([example](https://upsource.jetbrains.com/ring-ui/file/87e1889c8d1e1300cf2695c3958e4c5bdb27d1a9/components/progress-bar/progress-bar.test.js?nav=531:579:focused&line=0))
319* Use `render` when
320 1. the full html output tree is needed
321 2. testing the text content of a node
322 3. using some complex CSS selector, beyond the [subset](http://airbnb.io/enzyme/docs/api/selector.html) supported by other wrappers
323
324One possible workflow is to start with `shallow`, and if something doesn't work as expected, replace with `mount` or `render` based on the checklist.
325
326#### Local variables instead of context
327Using context(`this`) in testcases is discouraged in favour of local variables. This allows using arrow functions for all the testcases, which in turn helps to maintain uniformity.
328
329* before:
330 ```js
331 /* eslint-disable func-names */
332
333 describe('Something', () => {
334 beforeEach(function() {
335 this.foo = makeFoo();
336 });
337
338 it('testcase using foo', function() {
339 this.foo.should.equal(this.foo);
340 });
341
342 it('testcase not using foo', () => {
343 true.should.equal(true);
344 });
345 })
346 ```
347* after:
348 ```js
349 describe('Something', () => {
350 let foo;
351 beforeEach(() => {
352 foo = makeFoo();
353 });
354
355 it('testcase using foo', () => {
356 foo.should.equal(foo);
357 });
358
359 it('testcase not using foo', () => {
360 true.should.equal(true);
361 });
362 })
363 ```
364
365Sinon sandbox previously available as `this.sinon` became a global variable `sandbox`.
366
367
368### 25-05-2017: auth parameters have been uniformly named in camelCase. Support for snake_case parameters has been dropped.
369
370Attempting to pass `client_id`, `redirect_uri`, `request_credentials` will throw an exception. Use `clientId`, `redirectUri`, `requestCredentials` instead.
371
372### 27-04-2017: Unused HeaderAuth component has been removed
373Use brand new Header component instead
374
375### 26-04-2017: `stage-0/1` transforms are dropped
376The most widely used of them was [`transform-function-bind`](http://babeljs.io/docs/plugins/transform-function-bind/).
377
378* Before: `::this.handleClick`
379* After: `this.handleClick.bind(this)`
380
381Often it's better to declare an arrow property function instead of binding a method on each render.
382
383* Before:
384 ```js
385 class MyComponent extends Component() {
386 handleClick(e) {
387 ...
388 }
389
390 render() {
391 return <div onClick={::this.handleClick}/>;
392 }
393 }
394 ```
395* After:
396 ```js
397 class MyComponent extends Component() {
398 handleClick = e => {
399 ...
400 }
401
402 render() {
403 return <div onClick={this.handleClick}/>;
404 }
405 }
406 ```
407
408### 20-04-2017: Usage with webpack 1.* is deprecated
409This was necessary in order to enable tree-shaking.
410
411### 18-04-2017: Default export hack is dropped
412This affects only CommonJS usages.
413
414* Before: `const Button = require('ring-ui/components/button/button');`
415* After: `const Button = require('ring-ui/components/button/button').default;`
416* Even better: `import Button from 'ring-ui/components/button/button';`
417
418### 13-04-2017: Auth component no longer provides getSecure and getApi methods
419
420Use the brand new `HTTP` component instead.
421
422Before:
423```js
424import Auth from 'ring-ui/components/auth/auth';
425
426const auth = new Auth(authConfig);
427
428const services = auth.requestToken().
429 then(token => auth.getApi('services/header', token));
430```
431
432After:
433```js
434import Auth from 'ring-ui/components/auth/auth';
435import HTTP from 'ring-ui/components/http/http';
436
437const auth = new Auth(authConfig);
438const http = new HTTP(auth, auth.getAPIPath());
439
440const services = http.get('services/header');
441```
442
443### 13-02-2017: Checkbox + ReactNg connection does not support ngModel anymore. Use checkbox-ng instead.
444
445### 13-02-2017: Badge component has no margins anymore and is aligned by baseline
446
447### 20-01-2016: Webpack configuration structure change
448
449In order to migrate to webpack 2, we have to keep webpack.config clean of properties that don't match [the schema](https://github.com/webpack/webpack/blob/028c51301733836abbedc88be7483af2623f5943/schemas/webpackOptionsSchema.json).
450Since this change config moved to internal property `config`, and loaders moved to `loaders` properties:
451
452Before:
453```js
454require('webpack-config-merger')(require('ring-ui'), {
455 ...
456});
457```
458
459After:
460```js
461require('webpack-config-merger')(require('ring-ui').config, {
462 ...
463});
464```
465
466### 18-01-2016: Existing Header moved to legacy folder
467
468Before:
469
470```js
471import Header from 'ring-ui/components/header/header';
472import HeaderHelper from 'ring-ui/components/header/header__helper';
473```
474
475After:
476
477```js
478import Header from 'ring-ui/components/header-legacy/header-legacy';
479import HeaderHelper from 'ring-ui/components/header-legacy/header-legacy__helper';
480```
481
482### 04-01-2016 (2.5.5847): Popup reimplemented
483* `Popup` should now be rendered directly, as any other react child
484* `anchorElement` becomes optional, the parent DOM element is used as default anchor
485* `container` prop isn't used anymore. Instead, for correct positioning inside scrollable containers, scroll events on anchor ancestors are listened to.
486* Imperative API is replaced with declarative
487
488Before:
489```js
490class TogglePopup extends Component {
491 renderPopup() {
492 this.popup = Popup.renderPopup(
493 <Popup
494 hidden={false}
495 anchorElement={this.refs.button}
496 onClose={::this.forceUpdate} // to keep button state in sync with popup
497 dontCloseOnAnchorClick={true}
498 autoRemove={false}
499 >
500 <div ref="popupContent" />
501 </Popup>
502 )
503 }
504
505 toggle() {
506 if (!this.popup) {
507 this.renderPopup()
508 } else if (this.popup.isVisible()) {
509 this.popup.hide()
510 } else {
511 this.popup.show()
512 }
513 }
514
515 render() {
516 return (
517 <Button
518 ref="button"
519 active={this.popup && this.popup.isVisible()}
520 onClick={::this.toggle}
521 >
522 Toggle
523 </Button>
524 )
525 }
526}
527```
528
529After:
530```js
531class TogglePopup extends Component {
532 state = {hidden: false};
533
534 toggle() {
535 this.setState(state => ({hidden: !state.hidden}));
536 }
537
538 render() {
539 return (
540 <Button
541 active={!this.state.hidden}
542 onClick={::this.toggle}
543 >
544 Toggle
545
546 // Button becomes anchor here
547 <Popup
548 hidden={this.state.hidden}
549 // This is called on Esc press or outside click. There are also separate handlers for those two events
550 onCloseAttempt={() => this.setState({hidden: true})}
551 dontCloseOnAnchorClick={true}
552 >
553 // String refs don't work inside Popup. Use functional refs instead:
554 <div
555 ref={el => { this.popupContent = el; }}
556 />
557 </Popup>
558 </Button>
559 )
560 }
561}
562```
563
564### 05-12-2016: Alert API reimplemented
565
566* There are now two ways to use alerts in React: 1) as a pure component with custom management of alerts' stack (see Alert Container example), and 2) a simple `alert-service`, which should cover most usages.
567* Alert now receives the message as its child, not as `caption` prop.
568* Alert is now closeable by default.
569* Alert now has a `timeout` property to define timeout for `onCloseRequest` call.
570* Alert doesn't remove itself anymore. It now calls the `onCloseRequest` callback if it should be removed with an animation. The host component should then set the `isClosing={true}` prop which performs the closing animation and calls the `onClose` callback after it finishes.
571* To remove an alert use `{remove, removeWithoutAnimation}` functions from alert-service.
572* [Angular] `alert-ng` component was removed – `alert-service` should be used instead.
573
574### 29-11-2016: Several changes to Dialog and Island
575
576* dialog.scss was moved to dialog-ng component because dialog itself has been reimplemented.
577* island header and island content now have 32px spacing to suit the most common use case.
578
579### 18-11-2016: All buttons have type="button" by default. To set another type (e.g. "submit") you have to pass it explicitly
580
581### 15-11-2016: Footer no longer supports the "ring-footer_floating" modifier, use "floating" prop instead
582
583Before:
584```
585<Footer className="ring-footer_floating"/>
586```
587
588After:
589```
590<Footer floating={true}/>
591```
592
593### 31-10-2016: ListItem and ListCustom no longer pass all props to DOM elements
594
595Since React prohibits passing non-supported props to DOM elements we now have a whitelist of supported props declared in PropTypes. Other props are no longer passed to `ListItem` and `ListCustom`.
596
597### 29-08-2016: The long-deprecated .ring-input__error-bubble and .ring-form__footer styles were removed
598
599Please migrate to `.ring-error-bubble` and `.ring-panel`
600
601### 25-08-2016: SelectNg requires pack size to be specified in infinite scroll mode
602
603infiniteScrollPackSize should match the value of `$top` REST parameter.
604
605Before:
606```
607<rg-select ...
608 with-infinite-scroll="true">
609</rg-select>
610```
611
612After:
613```
614<rg-select ...
615 infinite-scroll-pack-size="50">
616</rg-select>
617```
618
619### 10-08-2016: Introduced new versioning system
620
621To make Ring UI installable with `npm install ring-ui` we have changed the versioning scheme.
622
623Before:
624```
6252.4.0-4995 (major.minor.patch-build)
626```
627
628After:
629```
6302.4.4996 (major.minor.build)
631```
632
633### 29-06-2016: Added "ring-" suffix to the constants in palette/palette.scss
634
635Before:
636```
637$palette-array, $palette-white-text, $palette-grey-text
638```
639
640After:
641```
642$ring-palette-array, $ring-palette-white-text, $ring-palette-grey-text
643```
644
645### 27-05-2016: rgba-attribute mixin was removed
646
647Use rgba colors directly as we no longer support ancient IE versions.
648
649Before:
650```
651 @include rgba-attribute('border-color', rgba(0, 0, 0, 0.15));
652```
653
654After:
655```
656 border-color: rgba(0, 0, 0, 0.15);
657```
658
659### 04-04-2016: Browser requirements for Autoprefixer should be specified in the target project (RG-963)
660
661Place a [`browserslist`](https://github.com/ai/browserslist#config-file) file in your project directory. Default query is `> 1%, last 2 versions, Firefox ESR` which currently resolves to:
662
663```
664and_chr 49
665and_uc 9.9
666android 4.4
667chrome 49
668chrome 48
669edge 13
670edge 12
671firefox 45
672firefox 44
673firefox 38
674ie 11
675ie 10
676ie_mob 11
677ie_mob 10
678ios_saf 9.3
679ios_saf 9.0-9.2
680ios_saf 8.1-8.4
681op_mini 5.0-8.0
682opera 36
683opera 35
684safari 9.1
685safari 9
686```
687
688### 17-05-2016: ES6! All existing code was converted, new code should be written in ES6 only
689
690### 22-04-2016: Permissions: parameter "config" does not have property config.serviceId, use config.services instead
691
692Before:
693```
694new Permissions(auth, {serviceId: auth.serviceId})
695```
696
697After:
698```
699new Permissions(auth, {services: [auth.serviceId]})
700```
701
702### 20-02-2016: `Button.Modifiers` enum was removed, attributes should be used instead
703
704Before:
705```
706<Button modifier={Button.Modifiers.BLUE}>{'Button text'}</Button>
707```
708
709After:
710```
711<Button blue={true}>{'Button text'}</Button>
712```
713
714### 03-02-2016: `in-space` parameter of `rg-permission` and `rg-permission-if` directives was renamed to `in-project` (RG-750)
715
716Before:
717```
718<div rg-permission="space-read" in-space="0-0-0-0-0">
719 Is visible if user has permission 'read-space' in space 0-0-0-0-0.
720</div>
721```
722
723After:
724```
725<div rg-permission="project-read" in-project="0-0-0-0-0">
726 Is visible if user has permission 'read-project' in project 0-0-0-0-0.
727</div>
728```
729
730### 28-01-2016: Changed the way form control sizes are set
731
732To set the size of the form controls, use the `ring-input-size_<size>` class, where `<size>` can be "sx" (50px), "s" (100px), "md" (200px) or "l" (400px).
733
734Before:
735```
736<div class="ring-form">
737 <input class="ring-input"/>
738 ...
739 <input class="ring-input ring-input_long"/>
740</div>
741```
742
743After:
744```
745<div class="ring-form">
746 <input class="ring-input ring-input-size_md"/>
747 ...
748 <input class="ring-input ring-input-size_l"/>
749</div>
750```
751
752### 28-01-2016: CSS class .ring-form__error-bubble was renamed to .ring-error-bubble
753
754### 11-01-2016: Popup API change: "Corner" and "Direction" props replaced with "Directions" array
755
756The arcane bitwise API was replaced with a more straightforward [direction specification](https://en.bem.info/libs/bem-components/v2.4.0/desktop/popup/#directions-field). "Corner" and "Direction" properties were dropped, "Directions" array was introduced. Example:
757
758Before:
759```
760props: {
761 ...
762 Corner: Popup.PopupProps.Corner.BOTTOM_LEFT,
763 Direction: Popup.PopupProps.Direction.DOWN | Popup.PopupProps.Direction.RIGHT
764 ...
765}
766```
767After:
768```
769props: {
770 ...
771 Directions: Popup.PopupProps.Directions.BOTTOM_RIGHT
772 ...
773}
774```
775
776### 22-12-2015: "form-ng__update-text" component was removed
777
778Please use the `rg-save-field` component instead.
779
780### 18-12-2015: "textarea" component was removed
781
782Please use `ring-input` instead.
783
784### 11-12-2015: SVGO is not used in Ring UI anymore, its config has been removed
785
786`jetbrains-icons` (since 1.0.12) and `jetbrains-logos` (since 1.0.5) packages now contain compressed SVG images, so there is no more `RingSVGOConfig` in `webpack.config.js`. Migration path: update `jetbrains-icons` and `jetbrains-logos`.
787
788### 07-12-2015: Changes in markup of ring-input, ring-textarea, error-bubble and ring-form__control (RG-965)
789
790* If ring-input or ring-textarea is used outside of `ring-form__control`, it should have class `ring-input_medium` (`ring-textarea_medium`), otherwise it will have a width of 100%
791* Class `ring-input_full-width` renamed to `ring-form__control_full-width` (as `ring-input` is now full-width by default)
792
793### 19-11-2015: LoaderInline was reimplemented
794
795Usages should be updated if you're not using the React component. ([See example](loader-inline.html)).
796
797### 02-11-2015: Auth: Hub 1.0 defaults applied
798
799* `redirect` param in Auth is now `false` by default
800* `redirect` param in Auth doesn't have the `background-unsafe` value anymore, so it should be removed from project's Auth configs
801* Background token refresh always uses `request_credentials` mode `silent`
802
803### 30-10-2015: webpack.config.js does not provide loaders for applications' code anymore, you will need to set up all the necessary loaders in your project configuration.
804
805### 30-10-2015: Icons are now loaded using [svg-sprite-loader](https://github.com/kisenka/svg-sprite-loader). They were also moved to a separate package (RG-550, RG-834)
806
807Icon's `glyph` property now accepts URL from loader instead of ID, e.g. `<Icon glyph={require('jetbrains-icons/add.svg')}>`.
808
809### 30-10-2015: Migration to ES6, React 0.14 and Babel (RG-361, RG-420)
810
811jQuery, when.js, and mout are not used anymore.
812
813### 30-10-2015: Components should be addressed by full path
814
815E.g. you should use import `ring-ui/components/react-ng/react-ng` instead of `react-ng/react-ng`.
816
817### 29-10-2015: Loader was renamed to LoaderInline to give place to the brand new Loader
818
819LoaderInline is `display: inline-block` by default and shouldn't be used as the main loader anymore.
820
821### 22-05-2015: "user2" icon duplicate removed
822
823### 06-05-2015: Unused filtering functionality removed from `popup-menu` (RG-700)
824
825`filter` property doesn't make sense anymore
826
827### 06-05-2015: `form-ng__update-text` is no more required in `form-ng` (part of RG-676)
828
829`form-ng__update-text` should be required separately from `form-ng` in consuming code
830
831### 28-04-2015: `ring-island` refactoring (RG-662)
832
833* Renamed `_island.scss` to `island.scss`
834* Removed `display: block` from the main class and dropped the `.ring-island_inline` modifier completely
835
836### 21-04-2015: Removed deprecated Auth.prototype.isGuest method (RG-644)
837
838Use the `guest` field of the user object instead. It is included by default in `Auth.prototype.requestUser` response.
839
840### 20-04-2015: userFields introduced in Auth config (RG-640)
841
842It's now required to set `userFields` in the `Auth` config if any fields other than `guest, id, name, profile/avatar/url` are needed in auth.requestUser. Please note that you need to explicitly specify `profile` sub-fields to request them, specifying `profile` won't do anything.
843
844Example:
845```js
846var auth = new Auth({
847 serverUri: 'http://localhost/',
848 userFields: ['login', 'profile/email']
849});
850```