2.ontwerp & bouwen - christoph3r3w/fix-the-flow-interactive-website GitHub Wiki

Ontwerp

The additions of the new page and components started with a wireflow and a general redesign

Wireflow

A Wireflow was made of the interactivity of the form-page, and it was documented in the fix-the-flow-wireframe

https://github.com/christoph3r3w/fix-the-flow-wireflow

WhatsApp Image 2023-12-04 at 14 07 31

form page

here below you can see the Form where users can add their events to the platform. after finishing the form they can submit it by clicking on the submit button which opens up a dialog that confirms the action. this happens through an eventListener on a timer setTimeout.

Progressive disclosure for the event form page

Screenshot 2023-12-18 102935 Screenshot 2023-12-18 103957 Screenshot 2023-12-18 104214

redesign

A small progression of the redesign for the event page.

Screenshot 2023-11-22 171207 Screenshot 2023-11-27 161059 Screenshot 2023-12-20 005040 Screenshot 2023-12-222 104629

Bouwen

HTML && CSS

for the progressive Disclosure

  fieldset:nth-of-type(1):not(:valid) ~ fieldset:nth-of-type(2), 
  fieldset:nth-of-type(2):not(:valid) ~ fieldset:nth-of-type(3),
  fieldset:nth-of-type(1):not(:valid) ~ fieldset:nth-of-type(3)
    {
  display: none;
  }

for validation of inputs (forgot to add 'regex')

       <div>
           <label for="f-event-title" >Event name</label>
           <input type="text" id="f-event-title" title="event-name" required>
       </div>
       <div>
          <label for="f-event-DateTime" >Date & time</label>
          <input type="date" id="f-event-DateTime" title="event-name" required>
          <input type="time" id="f-event-DateTime" title="event-name" required>
       </div>
    &:user-invalid{
        outline: solid rgba(255, 0, 0, 0.534);
        }
    &:user-valid,:checked {
        background:  rgba(69, 151, 69, 0.116) ;
        outline: solid  rgba(69, 151, 69, 0.322) ;

dialog

     <dialog id="dialog">
          <form action="get" method="dialog">
              <h3>you did the thing </h3> 
              <button type="submit">Close</button>
          </form>
      </dialog>
#dialog{
    position: sticky;
    translate: 0 -200px;
    top: 30rem;
    left: 30svw;
    width: 40dvw;
    height: 40dvh;
    border-radius: var(--g-c);
    border: 4px solid var(--blue2);
    box-shadow: 0px 0px 6px var(--white);
    text-align: center;

    &::backdrop{
        background-color:rgba(0, 0, 0, 0.592) ;
        background-color:#000000a6 ;
        backdrop-filter: blur(4px) ;
    }
}

JS

declaring and showing dialog

to make the dialog appear I used the 'click ' event to trigger the showModal function Screenshot 2023-12-20 210308

var abort = document.querySelector(".abort");
var formBtn = document.getElementById("submit");

if (formBtn) {
    var dialog = document.querySelector("dialog");
    formBtn.addEventListener('click',show);


    function show(){
        console.log('yes');
        dialog.showModal(); 
        //return(this)
    };
    console.log('Function executed on this page.');
}

User interface

Some user interface events were made with javascript. this assignment helped me learn the fundamentals of implementing interactivity for the form page.

fix-the-flow-UI-events

Screenshot 2023-12-19 234534

Video of the interactions : https://clipchamp.com/watch/AVBcFLu0PQ2


next 👉🏿 Integreren & Testen

⚠️ **GitHub.com Fallback** ⚠️