Git Product home page Git Product logo

blazorwebformscomponents's People

Contributors

christophweigert avatar code-dj avatar crazy-max avatar csharpfritz avatar dependabot[bot] avatar egil avatar eilon avatar grleachman avatar hishamco avatar invisibleprogrammer avatar juviquez avatar kahbazi avatar mpaulosky avatar timheuer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blazorwebformscomponents's Issues

Should the project use configuration for any "magic strings"

If there are JavaScript methods that need to be called by name, rather than store the name in a constant in the code, would it be better to use configuration?

This would also allow the developer to call their own methods in place of the default - should they require it.

JavaScript Interop Build tooling?

We have a concept for some tooling to help lint or provide build checking to ensure that C# code that calls JavaScript is referencing script that exists

Render ID in Html

Watching your stream, you mentioned people might have some javascript which depends on the html that webforms is creating. Does that mean that we should render the ID property in the html?

ListView does not support Grouping

The following features need to be implemented for grouping:

Attributes:

  • GroupPlaceholderID
  • GroupItemCount

Child Elements:

  • GroupSeparatorTemplate
  • GroupTemplate

Can we create an Eval() method for templates?

This might be a stretch, but what about writing a method that uses reflection across the @context item in a template to output a property specified in the same way that Eval() worked in Web Forms?

From Web Forms: <#: Eval("EmployeeName") %>
converts to: @Eval("EmployeeName")

TreeView: Analyze how the images and click expansion should work

We need some concrete requirements and tests to verify that images are placed appropriately for the various ImageSets. This means the following:

  • What is the behavior of the NoExpand images?
  • If there are no images, does clicking the parent nodes expand and collapse the tree?
  • Where and how are the gridlines placed?

Output compatibility mode

While watching the stream I saw Fritz debate on whether to use an older style of UI with inline styling like webforms would output, or a more modern approach.

I suggested that since the output may benefit from a "Compatibility mode" switch, which would let you choose the older style for front-end JS compatibility with webform output, or a new clean style which can drop the legacy webform style.

Attribute Value Conflicts

from @grleachman in #21

Attribute Value Conflicts

Adding RepeatDirection has caused a conflict with GridLines

There's now an ugly problem where the static enums require the markup to be messy:

Gridlines="Enums.GridLines.Horizontal"
RepeatDirection="Enums.RepeatDirection.Horizontal"

This is going to be painful for migration.

Decide on and Add StyleCop settings

Would it be an idea to use some standard settings for the project?

This would probably need to be phased.

  • Decide on a set of StyleCop settings to use (covering both c# and blazor), that would impact the project minimally, perhaps using warnings first.
  • Ensure any commits do not produce new warnings
  • Reduce warnings
  • Set warnings to Errors

Complete features for DataList

Add these attributes to the DataList

  • Caption
  • CaptionAlign
  • CellPadding
  • CellSpacing
  • GridLines
  • TabIndex

Add these child elements to the DataList

  • AlternatingItemStyle
  • AlternatingItemTemplate
  • ItemStyle
  • SeperatorStyle
  • SeperatorTemplate

Create a Snippet package

Suggestion to publish a Snippet package for the static imports to anabe phau enumeration types as well as other useful markup snippets.

Another option may be an extension or project templates

Accessibility concerns regarding Treeview and other controls

Using a Treeview can have some negative effects on accessibility users. From a personal point of view when using speech recognition.

It is very hard to move the mouse to a certain point to expand a node, especially when it is so small.

If a Treeview is used it would be helpful to have a search text box that will filter the nodes below. Also the arrow keys should work for moving around in the Treeview and expanding the nodes.

A Treeview is not very good for touch centric devices as generally the expand touch area is very small.

Also drop-down menus can have problems from a speech recognition point of view. At the very least they need to have something to indicate they drop-down.

When things only happen when a mouse hovers over something, it can be very difficult to discover this!

Custom Control shim?

When we consider converting usercontrols, master pages, and pages we also need to consider converting custom controls.

Is there a shim abstract class that we could make available that these classes that inherit from WebControl or CompositeControl could inherit from and be able to work with Blazor?

I think this may be a separate .NET Standard class library to support this goal

TreeView: DataBinding strategy

Discussion:

A recursive TreeNode binding strategy may more easily help enable other data-models beyond XML to bind data to the TreeView.

Colors in markup

In Web Forms, you were able to set attribute values for colors to either a color name or to an HTML hex color representation. In our components, you're forced in a Color object

Implement ViewState?

This may sound crazy, but do we want to implement ViewState in this project?

We could consider it in the name of helping with migration and make a super simple Dictionary<string,object> available in our components private scope that COULD provide the same features as ViewState.

We would want to mark it with an Obsolete flag to help encourage folks to migrate from using it long-term.

Improve Test Coverage on ListView Grouping

I wasn't happy with the test coverage.
Having gone back to review I find it's lacking, and the behaviour still doesn't mimic the WebForms correctly specifically around ItemSeparator.

There's an interesting anomaly on groups of 7 grouped by 3 where the ItemSeparator is added after the last item twice. Not sure why this is, but presume it needs to be mimicked, and will investigate other combinations.

GroupStart
seven Widget
ItemSeparator
ItemSeparator
GroupEnd

UPDATE

Having reviewed this. I found that the anomaly was intended behaviour. for a 7 items grouped in 6 layout, there would be 6 elements in the first group with 5 separators, and 1 element in the 2nd group with still 5 separators.

7 x 6 -> I s I s I s I s I s I G I s s s s s

Gitter Community

I just create a Gitter community named BlazorWebFormsComponents/community

@csharpfritz, I just take the initiative to create this community, hope this help for further discussion about this project

Consider refactor with BlazorComponentUtilities package

public static StringBuilder ToStyleString(this IHasStyle hasStyle, StringBuilder sb)
{
if (hasStyle.BackColor != default(WebColor)) sb.Append($"background-color:{ColorTranslator.ToHtml(hasStyle.BackColor.ToColor()).Trim()};");
if (hasStyle.ForeColor != default(WebColor)) sb.Append($"color:{ColorTranslator.ToHtml(hasStyle.ForeColor.ToColor())};");
if (hasStyle.BorderStyle != BorderStyle.None && hasStyle.BorderStyle != BorderStyle.NotSet && hasStyle.BorderWidth.Value > 0 && hasStyle.BorderColor != default(WebColor))
{
sb.Append($"border:{hasStyle.BorderWidth.ToString()} {hasStyle.BorderStyle.ToString().ToLowerInvariant()} {ColorTranslator.ToHtml(hasStyle.BorderColor.ToColor())};");
}
if (hasStyle.Font_Bold) sb.Append("font-weight:bold;");
if (hasStyle.Font_Italic) sb.Append("font-style:italic;");
if (!string.IsNullOrEmpty(hasStyle.Font_Names)) sb.Append($"font-family:{hasStyle.Font_Names};");
if (hasStyle.Font_Size != FontUnit.Empty) sb.Append($"font-size:{hasStyle.Font_Size.ToString()};");
if (hasStyle.Font_Underline || hasStyle.Font_Overline || hasStyle.Font_Strikeout)
{
sb.Append("text-decoration:");
var td = new StringBuilder();
if (hasStyle.Font_Underline) td.Append("underline ");
if (hasStyle.Font_Overline) td.Append("overline ");
if (hasStyle.Font_Strikeout) td.Append("line-through");
sb.Append(td.ToString().Trim());
sb.Append(";");
}
return sb;
}
public static void SetFontsFromAttributes(this IHasFontStyle hasStyle, Dictionary<string, object> additionalAttributes)
{
if (additionalAttributes != null)
{
if (additionalAttributes.ContainsKey("Font-Bold")) hasStyle.Font_Bold = bool.Parse(additionalAttributes["Font-Bold"].ToString());
if (additionalAttributes.ContainsKey("Font-Italic")) hasStyle.Font_Italic = bool.Parse(additionalAttributes["Font-Italic"].ToString());
if (additionalAttributes.ContainsKey("Font-Names")) hasStyle.Font_Names = additionalAttributes["Font-Names"].ToString();
if (additionalAttributes.ContainsKey("Font-Overline")) hasStyle.Font_Overline = bool.Parse(additionalAttributes["Font-Overline"].ToString());
if (additionalAttributes.ContainsKey("Font-Size")) hasStyle.Font_Size = FontUnit.Parse(additionalAttributes["Font-Size"].ToString());
if (additionalAttributes.ContainsKey("Font-Strikeout")) hasStyle.Font_Strikeout = bool.Parse(additionalAttributes["Font-Strikeout"].ToString());
if (additionalAttributes.ContainsKey("Font-Underline")) hasStyle.Font_Underline = bool.Parse(additionalAttributes["Font-Underline"].ToString());
}

https://www.nuget.org/packages/BlazorComponentUtilities/

MasterPages

What do we do with the MasterPage object? Is there a shim that could be constructed to redirect how a Blazor component is contained?

Handle LayoutTemplates

For controls like ListView, there are LayoutTemplate elements that declares the outer rendering for the component. There is typically a an ItemPlaceholderId attribute that defines an element id inside the LayoutTemplate where in the LayoutTemplate the contents of the component should be inserted.

<asp:ListView ItemPlaceholderId="foo">
	<LayoutTemplate>
	<span id="foo"></span>
	</LayoutTemplate>
</asp:ListView>

should render something like:

<span id="foo">
  == LISTVIEW CONTENT ==
</span>

Making the Test output better behaved.

currently test output is generated using Console.WriteLine.
This makes for a noisy output, and slows down the dotnet watch, critically during minimal march we need to optimise the tests and avoid any unnecessary stdout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.