Skip to content

Commit b09f0cf

Browse files
author
Maxime Mangel
committed
Give precedence to CSSProps, this has been changed by a previous commit
1 parent d96e025 commit b09f0cf

File tree

4 files changed

+174
-162
lines changed

4 files changed

+174
-162
lines changed

.paket/Paket.Restore.targets

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
1919
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
2020
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
21+
22+
<!-- .net core fdd -->
23+
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
24+
<PaketCommand Condition=" '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand>
25+
26+
<!-- no extension is a shell script -->
27+
<PaketCommand Condition=" '$(_PaketExeExtension)' == '' ">"$(PaketExePath)"</PaketCommand>
28+
2129
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2230
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2331
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
@@ -45,10 +53,10 @@
4553
</PropertyGroup>
4654

4755
<!-- If shasum and awk exist get the hashes -->
48-
<Exec Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
56+
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
4957
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" />
5058
</Exec>
51-
<Exec Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
59+
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
5260
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" />
5361
</Exec>
5462

@@ -140,9 +148,10 @@
140148
</DotNetCliToolReference>
141149
</ItemGroup>
142150

151+
<!-- Disabled for now until we know what to do with runtime deps - https://github.com/fsprojects/Paket/issues/2964
143152
<PropertyGroup>
144153
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
145-
</PropertyGroup>
154+
</PropertyGroup> -->
146155

147156
</Target>
148157

src/Fable.React/Fable.Helpers.React.fs

Lines changed: 156 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ open Fable.Core
66
open Fable.Core.JsInterop
77
open Fable.Import
88

9-
module Props =
9+
module rec Props =
1010
type IProp =
1111
interface end
1212

@@ -166,6 +166,161 @@ module Props =
166166
#endif
167167
interface IProp
168168

169+
type HTMLAttr =
170+
| DefaultChecked of bool
171+
| DefaultValue of string
172+
| Accept of string
173+
| AcceptCharset of string
174+
| AccessKey of string
175+
| Action of string
176+
| AllowFullScreen of bool
177+
| AllowTransparency of bool
178+
| Alt of string
179+
| [<CompiledName("aria-haspopup")>] AriaHasPopup of bool
180+
| [<CompiledName("aria-expanded")>] AriaExpanded of bool
181+
| Async of bool
182+
| AutoComplete of string
183+
| AutoFocus of bool
184+
| AutoPlay of bool
185+
| Capture of bool
186+
| CellPadding of obj
187+
| CellSpacing of obj
188+
| CharSet of string
189+
| Challenge of string
190+
| Checked of bool
191+
| ClassID of string
192+
| ClassName of string
193+
/// Alias of ClassName
194+
| [<CompiledName("className")>] Class of string
195+
| Cols of float
196+
| ColSpan of float
197+
| Content of string
198+
| ContentEditable of bool
199+
| ContextMenu of string
200+
| Controls of bool
201+
| Coords of string
202+
| CrossOrigin of string
203+
// | Data of string
204+
| [<CompiledName("data-toggle")>] DataToggle of string
205+
| DateTime of string
206+
| Default of bool
207+
| Defer of bool
208+
| Dir of string
209+
| Disabled of bool
210+
| Download of obj
211+
| Draggable of bool
212+
| EncType of string
213+
| Form of string
214+
| FormAction of string
215+
| FormEncType of string
216+
| FormMethod of string
217+
| FormNoValidate of bool
218+
| FormTarget of string
219+
| FrameBorder of obj
220+
| Headers of string
221+
| Height of obj
222+
| Hidden of bool
223+
| High of float
224+
| Href of string
225+
| HrefLang of string
226+
| HtmlFor of string
227+
| HttpEquiv of string
228+
| Icon of string
229+
| Id of string
230+
| InputMode of string
231+
| Integrity of string
232+
| Is of string
233+
| KeyParams of string
234+
| KeyType of string
235+
| Kind of string
236+
| Label of string
237+
| Lang of string
238+
| List of string
239+
| Loop of bool
240+
| Low of float
241+
| Manifest of string
242+
| MarginHeight of float
243+
| MarginWidth of float
244+
| Max of obj
245+
| MaxLength of float
246+
| Media of string
247+
| MediaGroup of string
248+
| Method of string
249+
| Min of obj
250+
| MinLength of float
251+
| Multiple of bool
252+
| Muted of bool
253+
| Name of string
254+
| NoValidate of bool
255+
| Open of bool
256+
| Optimum of float
257+
| Pattern of string
258+
| Placeholder of string
259+
| Poster of string
260+
| Preload of string
261+
| RadioGroup of string
262+
| ReadOnly of bool
263+
| Rel of string
264+
| Required of bool
265+
| Role of string
266+
| Rows of float
267+
| RowSpan of float
268+
| Sandbox of string
269+
| Scope of string
270+
| Scoped of bool
271+
| Scrolling of string
272+
| Seamless of bool
273+
| Selected of bool
274+
| Shape of string
275+
| Size of float
276+
| Sizes of string
277+
| Span of float
278+
| SpellCheck of bool
279+
| Src of string
280+
| SrcDoc of string
281+
| SrcLang of string
282+
| SrcSet of string
283+
| Start of float
284+
| Step of obj
285+
| Summary of string
286+
| TabIndex of float
287+
| Target of string
288+
| Title of string
289+
| Type of string
290+
| UseMap of string
291+
| Value of string
292+
| Width of obj
293+
| Wmode of string
294+
| Wrap of string
295+
| About of string
296+
| Datatype of string
297+
| Inlist of obj
298+
| Prefix of string
299+
| Property of string
300+
| Resource of string
301+
| Typeof of string
302+
| Vocab of string
303+
| AutoCapitalize of string
304+
| AutoCorrect of string
305+
| AutoSave of string
306+
// | Color of string // Conflicts with CSSProp, shouldn't be used in HTML5
307+
| ItemProp of string
308+
| ItemScope of bool
309+
| ItemType of string
310+
| ItemID of string
311+
| ItemRef of string
312+
| Results of float
313+
| Security of string
314+
| Unselectable of bool
315+
#if !FABLE_COMPILER
316+
| Custom of string * obj
317+
| Style of CSSProp list
318+
| Data of string * obj
319+
#else
320+
static member inline Custom (key: string, value: obj) : HTMLAttr = !!(key, value)
321+
#endif
322+
interface IHTMLProp
323+
169324
type CSSProp =
170325
| AlignContent of obj
171326
| AlignItems of obj
@@ -579,162 +734,6 @@ module Props =
579734
static member inline Custom (key: string, value: obj) : CSSProp = !!(key, value)
580735
#endif
581736

582-
583-
type HTMLAttr =
584-
| DefaultChecked of bool
585-
| DefaultValue of string
586-
| Accept of string
587-
| AcceptCharset of string
588-
| AccessKey of string
589-
| Action of string
590-
| AllowFullScreen of bool
591-
| AllowTransparency of bool
592-
| Alt of string
593-
| [<CompiledName("aria-haspopup")>] AriaHasPopup of bool
594-
| [<CompiledName("aria-expanded")>] AriaExpanded of bool
595-
| Async of bool
596-
| AutoComplete of string
597-
| AutoFocus of bool
598-
| AutoPlay of bool
599-
| Capture of bool
600-
| CellPadding of obj
601-
| CellSpacing of obj
602-
| CharSet of string
603-
| Challenge of string
604-
| Checked of bool
605-
| ClassID of string
606-
| ClassName of string
607-
/// Alias of ClassName
608-
| [<CompiledName("className")>] Class of string
609-
| Cols of float
610-
| ColSpan of float
611-
| Content of string
612-
| ContentEditable of bool
613-
| ContextMenu of string
614-
| Controls of bool
615-
| Coords of string
616-
| CrossOrigin of string
617-
// | Data of string
618-
| [<CompiledName("data-toggle")>] DataToggle of string
619-
| DateTime of string
620-
| Default of bool
621-
| Defer of bool
622-
| Dir of string
623-
| Disabled of bool
624-
| Download of obj
625-
| Draggable of bool
626-
| EncType of string
627-
| Form of string
628-
| FormAction of string
629-
| FormEncType of string
630-
| FormMethod of string
631-
| FormNoValidate of bool
632-
| FormTarget of string
633-
| FrameBorder of obj
634-
| Headers of string
635-
| Height of obj
636-
| Hidden of bool
637-
| High of float
638-
| Href of string
639-
| HrefLang of string
640-
| HtmlFor of string
641-
| HttpEquiv of string
642-
| Icon of string
643-
| Id of string
644-
| InputMode of string
645-
| Integrity of string
646-
| Is of string
647-
| KeyParams of string
648-
| KeyType of string
649-
| Kind of string
650-
| Label of string
651-
| Lang of string
652-
| List of string
653-
| Loop of bool
654-
| Low of float
655-
| Manifest of string
656-
| MarginHeight of float
657-
| MarginWidth of float
658-
| Max of obj
659-
| MaxLength of float
660-
| Media of string
661-
| MediaGroup of string
662-
| Method of string
663-
| Min of obj
664-
| MinLength of float
665-
| Multiple of bool
666-
| Muted of bool
667-
| Name of string
668-
| NoValidate of bool
669-
| Open of bool
670-
| Optimum of float
671-
| Pattern of string
672-
| Placeholder of string
673-
| Poster of string
674-
| Preload of string
675-
| RadioGroup of string
676-
| ReadOnly of bool
677-
| Rel of string
678-
| Required of bool
679-
| Role of string
680-
| Rows of float
681-
| RowSpan of float
682-
| Sandbox of string
683-
| Scope of string
684-
| Scoped of bool
685-
| Scrolling of string
686-
| Seamless of bool
687-
| Selected of bool
688-
| Shape of string
689-
| Size of float
690-
| Sizes of string
691-
| Span of float
692-
| SpellCheck of bool
693-
| Src of string
694-
| SrcDoc of string
695-
| SrcLang of string
696-
| SrcSet of string
697-
| Start of float
698-
| Step of obj
699-
| Summary of string
700-
| TabIndex of float
701-
| Target of string
702-
| Title of string
703-
| Type of string
704-
| UseMap of string
705-
| Value of string
706-
| Width of obj
707-
| Wmode of string
708-
| Wrap of string
709-
| About of string
710-
| Datatype of string
711-
| Inlist of obj
712-
| Prefix of string
713-
| Property of string
714-
| Resource of string
715-
| Typeof of string
716-
| Vocab of string
717-
| AutoCapitalize of string
718-
| AutoCorrect of string
719-
| AutoSave of string
720-
// | Color of string // Conflicts with CSSProp, shouldn't be used in HTML5
721-
| ItemProp of string
722-
| ItemScope of bool
723-
| ItemType of string
724-
| ItemID of string
725-
| ItemRef of string
726-
| Results of float
727-
| Security of string
728-
| Unselectable of bool
729-
#if !FABLE_COMPILER
730-
| Custom of string * obj
731-
| Style of CSSProp list
732-
| Data of string * obj
733-
#else
734-
static member inline Custom (key: string, value: obj) : HTMLAttr = !!(key, value)
735-
#endif
736-
interface IHTMLProp
737-
738737
#if FABLE_COMPILER
739738
let inline Style (css: CSSProp list): HTMLAttr =
740739
!!("style", keyValueList CaseRules.LowerFirst css)

src/Fable.React/Fable.Helpers.ReactServer.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ let private renderHtmlAttr (attr: HTMLAttr): string =
492492
| Class v -> strAttr "class" v
493493
| Cols v -> strAttr "cols" (string v)
494494
| ColSpan v -> strAttr "colspan" (string v)
495-
| Content v -> strAttr "content" v
495+
| HTMLAttr.Content v -> strAttr "content" v
496496
| ContentEditable v -> boolAttr "contenteditable" v
497497
| ContextMenu v -> strAttr "contextmenu" v
498498
| Controls v -> boolAttr "controls" v
@@ -618,7 +618,7 @@ let private renderHtmlAttr (attr: HTMLAttr): string =
618618
let css = css.[0..css.Length - 2]
619619
strAttr "style" css
620620

621-
| Custom (key, value) -> strAttr (key.ToLower()) (string value)
621+
| HTMLAttr.Custom (key, value) -> strAttr (key.ToLower()) (string value)
622622
| Data (key, value) -> strAttr ("data-" + key) (string value)
623623

624624
let private renderSVGAttr (attr: SVGAttr): string =

src/Fable.React/RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 3.0.0-alpha-003
2+
3+
* Give precedence to CSSProps
4+
15
### 3.0.0-alpha-002
26

37
* Add Server Side Rendering Support

0 commit comments

Comments
 (0)