Skip to content

Rationalize component and form APIs #58

@bradgessler

Description

@bradgessler

Opening this issue to encapsulate various proposals that would be a breaking change and released in 0.6.x.

Related to issues and PRs:

The one "rule" I'd write for "HTML-facing" code, like Form and Component classes, are that **kwargs keyword arguments are HTML elements. Non-html elements should be passed in via *args positional arguments or setters.

That means the PR at #55 would be merged and released in a 0.6.x breaking release.

The other proposal, #53, goes against this consistency since Form is an HTML-facing Phlex component; thus adding keyword arguments to the initializer would be inconsistent. One option is a positional argument, but my preference for this would be for developers to use a setter or subclass.

Details for each implementation will be in the respective PRs or issues. Respond to this issue for overall API consistency and change concerns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions