Skip to content

Conversation

@kabix09
Copy link
Contributor

@kabix09 kabix09 commented Nov 30, 2025

Solve #162 issue.

  1. Fix margins for headers and sections in "Create Application" tabs

    Adjusted spacing to make headers and sections more aligned and readable.

    screenshot
  2. Fix warnings overflowing tabs in the top navbar

    Increased tab width so the ⚠ icon for invalid validation fits properly and does not overflow.

    screenshot
  3. Fix initial validation in tabs

    Form fields are no longer marked as validated when first entering the tab.

  4. Fix sidebar menu button hover after resetting forms

    After resetting forms, sidebar buttons now properly respond to hover.

Copy link
Member

@w1stler w1stler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • add commit with styling the code

Copy link
Contributor

@Rafalkufel Rafalkufel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this part about validation are redundant. All others: good job 💪

Comment on lines 88 to 95
# When showing the application container as part of UI flow we
# don't want to immediately highlight pristine fields. Use the
# internal _validate with show_errors=False to just check validity
# without triggering visual validation. Full validation (with
# highlights) will be triggered when user submits or switches tabs.
if hasattr(self.application_container, "_validate"):
return self.application_container._validate(show_errors=False)
# fallback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main task of this method is validate + highlight application, and all it's tabs. It should be called before we print documents. I don't think that adding another responsibility to it (ie show_errors=False) is correct.

Comment on lines 163 to 172
# Backwards-compatible validate method.
# By default this behaves as before and will show field-level
# validation results. If called with show_errors=False it will
# only check `is_valid` flags (no display/highlighting) which is
# useful when toggling visibility of the application form so we
# don't highlight pristine fields immediately.
return self._validate(show_errors=True)

def _validate(self, show_errors: bool = True) -> bool:
"""Internal validation helper.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we have:

  • method validate to mainly highlight errors of this component, and child components and additionally returns boolean of if given component is valid
  • property is_valid to only check if given component (and child components) is valid, without highlighting errors.

Your change tries to push this two into validate. Do we really need it?

self.application_container = parent
layout = QVBoxLayout(self)
layout.setAlignment(Qt.AlignTop)
layout.setAlignment(Qt.AlignmentFlag.AlignTop)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kabix09 kabix09 force-pushed the feature/dev/162_repair_validation branch from 84131c7 to b403d61 Compare January 7, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants