Commit Graph

193 Commits

Author SHA1 Message Date
Igor Demin
b60de28986 Update EventsListenerScope.kt 2022-07-05 13:40:18 +02:00
Philip Wedemann
ad757a8f0a Web: Add list overload for classes (#2094)
* Add list overload for classes

* Add array and collection overload for classes

* Remove array overload

Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
2022-06-13 09:21:34 +02:00
Oleksandr Karpovich
f1854a9dce web: add HtmlAttrMarker (#1958)
To forbid declaring of attrs is style scope

closes #1893

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-03-16 16:48:06 +01:00
InsanusMokrassar
22da8d9529 Add support of dl, dt and dd (#1922) 2022-03-07 11:51:17 +01:00
Oleksandr Karpovich
1ab63ed995 fix Style composable and CSSRulesHolderState (#1889)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-02-23 09:59:19 +01:00
Shagen Ogandzhanian
cd7691a53f Simplify inner CSS API, remove css fun completely (was experimental, will be redesigned) 2022-02-22 18:55:14 +01:00
Shagen Ogandzhanian
6f89804467 [web][tests] always use nextChild when you start with root.children[0], remove redundant braces 2022-02-18 13:33:50 +01:00
Oleksandr Karpovich
5b496eb191 web: update TagElement with tagName: String (#1827)
* web: update TagElement with tagName: String

Enable changing the tagName value. This will delete the initial html element and create a new one with a new tagName.

Cache ElementBuilder instances.

* add comments

* update PR according to discussion

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-02-16 11:37:53 +01:00
Oleksandr Karpovich
bccf783976 web: make canvasAttributeTest independent of attributes order 2022-02-14 13:58:36 +01:00
Shreck Ye
7a9776cc43 web: make applyAttrs in the second overloaded TagElement nullable to be consistent with the first one (#1814) 2022-02-14 12:39:03 +01:00
Philip Wedemann
a528838712 Web: Add Canvas element (#1823)
Co-authored-by: hfhbd <hfhbd@users.noreply.github.com>
2022-02-14 12:32:27 +01:00
Oleksandr Karpovich
f7d71a034b web: add a test keyChangesTheOrderButKeepsSameInstances 2022-02-11 15:05:43 +01:00
Oleksandr Karpovich
21cda3f3c6 web: make ComposeDomNode inline (#1808)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-02-10 11:08:15 +01:00
Shagen Ogandzhanian
edac50ae39 Introduce HTMLElement.computedStyle: CSSStyleDeclaration helper function (#1815) 2022-02-09 12:17:38 +01:00
Shagen Ogandzhanian
44cc13add1 Enable warning as errors by default in web (#1803) 2022-02-07 18:31:10 +01:00
Oleksandr Karpovich
7ea30be924 web: hide internal properties from AttrsScope, EventsListenerScope, StyleScope (#1802)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-02-07 15:27:48 +01:00
Oleksandr Karpovich
af2c354f72 web: apply classes and style before all other attributes and properties (#1788)
* web: apply `classes` before all other attributes and properties

This mitigates "Flash of unstyled content"

* apply style {} before attr(...). Add more tests

* use val instead of var for classes

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-02-07 11:43:38 +01:00
Shagen Ogandzhanian
685e305c5e Move renderComposable to internal-web-core-runtime (#1789) 2022-02-04 21:00:59 +01:00
Shagen Ogandzhanian
6aaeddc4b4 Use standard side effects in Elements.kt (#1793) 2022-02-04 20:30:12 +01:00
Oleksandr Karpovich
0c30a3e2af web: add typealias AttrsBuilder referencing new AttrsScopeBuilder (#1778)
This mitigates possible breaking API changes

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2022-02-02 14:24:10 +01:00
Martynas Petuška
f98dfbc761 web: AttrsScope interface extraction (#1694)
* AttrsScope interface extraction

* PR amendments

* resolve conflicts

* remove yarn lockfile

* move submodule back
2022-02-01 14:06:34 +01:00
Shagen Ogandzhanian
82bd465f5b Deprecate DisposableRefEffect and DomSideEffect (#1714) 2022-01-29 00:23:41 +01:00
Shagen Ogandzhanian
4bf01cf5e0 Make DomElementWrapper private (#1749) 2022-01-29 00:10:19 +01:00
Shagen Ogandzhanian
b71a5161a7 Reuse renderComposable in tests (#1732)
This also deprecates renderTestComposable
2022-01-25 11:36:37 +01:00
Oleksandr Karpovich
a4604d4a72 web: make Nth.Functional, Nth.Odd, Nth.Even private (#1633)
add corresponding public functions and values instead

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-12-23 10:48:54 +01:00
Shagen Ogandzhanian
87d983e0a5 Fix for Nth.Functional (#1609) 2021-12-16 16:08:08 +01:00
Shagen Ogandzhanian
211fe2e63f Introduce separate test for stylesheet inheritance 2021-12-14 17:09:28 +01:00
Shagen Ogandzhanian
90cb181a71 Core with Frefox tests enabled (#1563) 2021-12-08 12:45:46 +01:00
Shagen Ogandzhanian
d902912424 Make all CSS Selectors private (#1519) 2021-12-01 14:10:13 +01:00
Oleksandr Karpovich
cf62af9a23 web (breaking change): make constructors of CSSSelectors classes internal (#1510)
* web (breaking change): Make CSSSelector constructors internal and move constant selectors instances to `SelectorsScope`

* web (breaking change): Make CSSSelectors classes internal

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-11-30 16:47:27 +01:00
Oleksandr Karpovich
1b731e0af6 web (breaking change): move top level functions for css selectors to new SelectorsScope (#1504)
* web (breaking change): move top level functions for css selectors to new SelectorsScope

These functions don't need to be on top level because their purpose is to be used within StyleSheet

* web: update CSSSelector plus operator

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-11-30 14:47:30 +01:00
Oleksandr Karpovich
d87c29a10d web: add test for CSSSelector plus operator 2021-11-30 14:15:09 +01:00
Oleksandr Karpovich
4623985462 web (breaking change): move combine and feature functions to GenericStyleSheetBuilder scope (in CSSMediaRule.kt) (#1508)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-11-30 11:34:20 +01:00
Oleksandr Karpovich
6d0a0f4f1d web (breaking change): make some functions internal (#1509)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-11-30 11:33:55 +01:00
Abasov Akif
43a16c8e77 Throw exception for String + CSSSelector with self cases. (#1462)
* Throw exception for `String + CSSSelector` with `self` cases.

* Refactoring: CSSSelector: open -> abstract, assertTrue -> assertFailsWith

* Exceptions rewording

* CSSSelfSelector: public -> internal
2021-11-29 11:37:17 +01:00
Oleksandr Karpovich
45a63ec41c web: remove Options for event listeners (#1470)
Options were never actually applied and there was no way to use anything beside Options.DEFAULT

It's still possible to set options using k/js `addEventListener` on the element's reference

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-11-26 15:37:25 +01:00
Oleksandr Karpovich
3778eadd37 web: add inputmode global attribute (#1461)
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode

closes https://github.com/JetBrains/compose-jb/issues/1338

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-11-25 15:27:43 +01:00
Abasov Akif
974ef56832 Fix css selectors: combine, sibling (#1418) 2021-11-22 09:55:49 +01:00
Oleksandr Karpovich
bbec5eaa43 web: add tests for Css selectors desc (#1305)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-10-25 10:46:15 +02:00
Abasov Akif
984a26ce1d Pass resolved with self selector to nested builder (#1298) 2021-10-25 10:06:07 +02:00
Abasov Akif
14bf6674d9 Add implicit self for nested css selector (#1284)
* Deprecate `descendant` and introduce `desc` util to combine selectors

* Add internal `contains` method to `CSSSelector`

* Add implicit self for nested css selector
2021-10-22 16:11:03 +02:00
Oleksandr Karpovich
c5c28f8aad web: make auto-css experimental (#1294)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-10-22 12:32:09 +02:00
Oleksandr Karpovich
354e48a542 Web: fix jumping cursor of controlled inputs (#1287)
* web: fix cursor position for controlled inputs (wip)

* web: fix cursor position for controlled inputs (wip)

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-10-21 19:02:11 +02:00
Oleksandr Karpovich
1638f0f08b web: fix mouse event for safari mobile (#1288)
Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-10-21 19:02:01 +02:00
Philip Wedemann
13620b9dd7 Align StyleSheetBuilder parameter with other @Composable ContentBuilder and add test (#1112) 2021-10-14 11:56:41 +02:00
Abasov Akif
381a95bb62 Basic animations test (#1233)
Basic animations test
2021-10-06 17:36:34 +03:00
Oleksandr Karpovich
626cba019a web: add RadioGroup component to manage several Radio Inputs (#1116)
* web: add RadioGroup component to manage several Radio Inputs

* web: improve RadioGroup PR after discussions

Co-authored-by: Oleksandr Karpovich <oleksandr.karpovich@jetbrains.com>
2021-09-16 10:39:11 +02:00
Shagen Ogandzhanian
4c252b8196 Use asHtmlElement helper only in TestUtils
TestUtils is a perfect classic name!
2021-08-30 22:28:53 +02:00
Shagen Ogandzhanian
c8f91a9695 Extract PositionTests from StaticComposableTests and use runTest in both 2021-08-30 22:11:35 +02:00
Shagen Ogandzhanian
6b209ebd87 Prepare DomApplier and related code for working with SVG entities 2021-08-25 22:35:24 +02:00