Skip to content

Commit 7df1e2c

Browse files
authored
Blazor: Reorganize files and prepend NationalInstruments namespace (#2892)
# Pull Request ## 🤨 Rationale For consistency with other NI-authored binaries, we want the Blazor assemblies from this repo to be namespaced under `NationalInstruments`. Also, we want to reorganize the Blazor projects to better match the structure of the "components" packages. ## 👩‍💻 Implementation - changed namespaces and assembly names from `FooBlazor` to `NationalInstruments.FooBlazor` - moved components `.razor` and `.razor.cs` files into component-specific subdirectories - moved component-specific type files into said directories - renamed `Components` folder to `Source` - moved shared files from the root into a `Source/Patterns` directory ## 🧪 Testing Build/tests pass
1 parent 3dd7811 commit 7df1e2c

File tree

376 files changed

+607
-572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

376 files changed

+607
-572
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "major",
3+
"comment": "Prepend NationalInstruments to Blazor namespaces",
4+
"packageName": "@ni/nimble-blazor",
5+
"email": "7282195+m-akinc@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "major",
3+
"comment": "Prepend NationalInstruments to Blazor namespaces",
4+
"packageName": "@ni/ok-blazor",
5+
"email": "7282195+m-akinc@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "major",
3+
"comment": "Prepend NationalInstruments to Blazor namespaces",
4+
"packageName": "@ni/spright-blazor",
5+
"email": "7282195+m-akinc@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/blazor-workspace/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
NimbleBlazor/wwwroot/nimble-tokens/
33
NimbleBlazor/wwwroot/nimble-components/
44
NimbleBlazor/wwwroot/NimbleBlazor.HybridWorkaround.js
5-
NimbleBlazor/Components/Icons/
5+
NimbleBlazor/Source/Icons/
66
NimbleBlazor/NuGetFiles/files/
77
SprightBlazor/wwwroot/nimble-tokens/
88
SprightBlazor/wwwroot/spright-components/

packages/blazor-workspace/Examples/Demo.Client/packages.lock.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,25 +353,25 @@
353353
"AspNetCore.SassCompiler": "[1.97.1, )",
354354
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )",
355355
"NI.CSharp.Analyzers": "[2.0.35, )",
356-
"NimbleBlazor": "[1.0.0, )",
357-
"OkBlazor": "[1.0.0, )",
358-
"SprightBlazor": "[1.0.0, )"
356+
"NationalInstruments.NimbleBlazor": "[1.0.0, )",
357+
"NationalInstruments.OkBlazor": "[1.0.0, )",
358+
"NationalInstruments.SprightBlazor": "[1.0.0, )"
359359
}
360360
},
361-
"nimbleblazor": {
361+
"NationalInstruments.NimbleBlazor": {
362362
"type": "Project",
363363
"dependencies": {
364364
"Apache.Arrow": "[22.1.0, 22.1.0]",
365365
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )"
366366
}
367367
},
368-
"okblazor": {
368+
"NationalInstruments.OkBlazor": {
369369
"type": "Project",
370370
"dependencies": {
371371
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )"
372372
}
373373
},
374-
"sprightblazor": {
374+
"NationalInstruments.SprightBlazor": {
375375
"type": "Project",
376376
"dependencies": {
377377
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )"

packages/blazor-workspace/Examples/Demo.Client/wwwroot/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<base href="./" />
1010
<link href="css/site.css" rel="stylesheet" />
1111
<link href="Demo.Client.styles.css" rel="stylesheet" />
12-
<link href="_content/NimbleBlazor/nimble-tokens/css/fonts.css" rel="stylesheet" />
12+
<link href="_content/NationalInstruments.NimbleBlazor/nimble-tokens/css/fonts.css" rel="stylesheet" />
1313
<link rel="icon" href="favicon.ico" sizes="any">
1414
</head>
1515

@@ -21,7 +21,7 @@
2121
<a href="" class="reload">Reload</a>
2222
<a class="dismiss">🗙</a>
2323
</div>
24-
<script src="_content/OkBlazor/ok-components/all-components-bundle.min.js"></script>
24+
<script src="_content/NationalInstruments.OkBlazor/ok-components/all-components-bundle.min.js"></script>
2525
<script src="_framework/blazor.webassembly.js"></script>
2626
</body>
2727

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@using Microsoft.AspNetCore.Components.Web
2-
@using NimbleBlazor
2+
@using NationalInstruments.NimbleBlazor

packages/blazor-workspace/Examples/Demo.Hybrid/packages.lock.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,25 +360,25 @@
360360
"AspNetCore.SassCompiler": "[1.97.1, )",
361361
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )",
362362
"NI.CSharp.Analyzers": "[2.0.35, )",
363-
"NimbleBlazor": "[1.0.0, )",
364-
"OkBlazor": "[1.0.0, )",
365-
"SprightBlazor": "[1.0.0, )"
363+
"NationalInstruments.NimbleBlazor": "[1.0.0, )",
364+
"NationalInstruments.OkBlazor": "[1.0.0, )",
365+
"NationalInstruments.SprightBlazor": "[1.0.0, )"
366366
}
367367
},
368-
"nimbleblazor": {
368+
"NationalInstruments.NimbleBlazor": {
369369
"type": "Project",
370370
"dependencies": {
371371
"Apache.Arrow": "[22.1.0, 22.1.0]",
372372
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )"
373373
}
374374
},
375-
"okblazor": {
375+
"NationalInstruments.OkBlazor": {
376376
"type": "Project",
377377
"dependencies": {
378378
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )"
379379
}
380380
},
381-
"sprightblazor": {
381+
"NationalInstruments.SprightBlazor": {
382382
"type": "Project",
383383
"dependencies": {
384384
"Microsoft.AspNetCore.Components.Web": "[8.0.24, )"

packages/blazor-workspace/Examples/Demo.Hybrid/wwwroot/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- This is the style that should always match the name of your project -->
1010
<link href="css/app.css" rel="stylesheet" />
1111
<link href="Demo.Hybrid.styles.css" rel="stylesheet" />
12-
<link href="_content/NimbleBlazor/nimble-tokens/css/fonts.css" rel="stylesheet" />
12+
<link href="_content/NationalInstruments.NimbleBlazor/nimble-tokens/css/fonts.css" rel="stylesheet" />
1313
</head>
1414

1515
<body>
@@ -21,7 +21,7 @@
2121
<a class="dismiss">🗙</a>
2222
</div>
2323
<script src="_framework/blazor.webview.js"></script>
24-
<script src="_content/OkBlazor/ok-components/all-components-bundle.min.js"></script>
24+
<script src="_content/NationalInstruments.OkBlazor/ok-components/all-components-bundle.min.js"></script>
2525
</body>
2626

2727
</html>

packages/blazor-workspace/Examples/Demo.Server/Components/App.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<base href="/" />
88
<link href="css/site.css" rel="stylesheet" />
99
<link href="Demo.Server.styles.css" rel="stylesheet" />
10-
<link href="_content/NimbleBlazor/nimble-tokens/css/fonts.css" rel="stylesheet" />
10+
<link href="_content/NationalInstruments.NimbleBlazor/nimble-tokens/css/fonts.css" rel="stylesheet" />
1111
<link rel="icon" href="favicon.ico" sizes="any">
1212
<HeadOutlet @rendermode="InteractiveServer" />
1313
</head>
1414

1515
<body>
1616
<Demo.Shared.Routes @rendermode="InteractiveServer" />
1717
<script src="_framework/blazor.web.js"></script>
18-
<script src="_content/OkBlazor/ok-components/all-components-bundle.min.js"></script>
18+
<script src="_content/NationalInstruments.OkBlazor/ok-components/all-components-bundle.min.js"></script>
1919
</body>
2020

2121
</html>

0 commit comments

Comments
 (0)