Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor PdmUiOrdering::LayoutOptions #10802

Closed
magnesj opened this issue Nov 8, 2023 · 0 comments · Fixed by #10809
Closed

Refactor PdmUiOrdering::LayoutOptions #10802

magnesj opened this issue Nov 8, 2023 · 0 comments · Fixed by #10809
Assignees
Labels
System Refactoring or build/test system issues. Code improvments not directly affecting the user.

Comments

@magnesj
Copy link
Member

magnesj commented Nov 8, 2023

Use of Layout options in PdmUiOrdering is difficult and the default constructor hides the names of the struct members. This makes the client code difficult to read and understand.

Suggestion

Move MAX_COLUMN_SPAN to PdmUiOrdering
Avoid default constructor, add initializer

    static const int MAX_COLUMN_SPAN = -1;
    struct LayoutOptions
    {
        bool newRow {true};
        int  totalColumnSpan{MAX_COLUMN_SPAN};
        int  leftLabelColumnSpan{MAX_COLUMN_SPAN};
    };

@magnesj magnesj added the System Refactoring or build/test system issues. Code improvments not directly affecting the user. label Nov 8, 2023
@magnesj magnesj added this to the Maintenance 2023 - Sprint 11 milestone Nov 8, 2023
@magnesj magnesj self-assigned this Nov 8, 2023
@github-actions github-actions bot added the PendingRelease Issues is fixed and will be available in next release label Nov 10, 2023
@magnesj magnesj removed the PendingRelease Issues is fixed and will be available in next release label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System Refactoring or build/test system issues. Code improvments not directly affecting the user.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant