Skip to content
guillaume charbonnier edited this page Mar 10, 2019 · 2 revisions

Messy : a refactoring challenge

4

😅 (difficulty) ⌛ (time-Box) 🔗 (related to)
1️⃣ / 5️⃣ 15 - 45 mn QtQuick

Refactor the existing (very poor) implementation keeping the existing 'features' :

  • display two fields for the user to input a password
    • input fields should display a hint text only visible when input field is empty
    • the second input field should be active only when the first one is filled
  • when both input fields contains a text, a "register" button should be dynamically created
    • when clicking on the button, the content of the input fields are compared to ensure the passwords are identical :
      • if not a warning message show up
      • if both passwords are identical a pop up informs that everything is ok and clicking the popup should put us back to the initial state.

👶 Newbies area

Warning : Spoilers !!!

ℹ️ useful information and hints

  • The Loader item provides a declarative way of creating/destroying items dynamically
  • a good component should never be aware of the "outside world"

Clone this wiki locally