Coder Social home page Coder Social logo

phpschool.io's People

Contributors

aydinhassan avatar bantya avatar dependabot[bot] avatar devnuhl avatar matjack1 avatar mikeymike avatar mnapoli avatar oliverchenery avatar osamu2001 avatar shakyshane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpschool.io's Issues

Intro talk

Talk to be given at the event prior to our main event as a small intro as to what is happening.

PHP 8 blog post

Introducing PHP 8 Appreciate

Intro [Together]

What it Covers

bullet list / general overview [Michael]

How to Get Started

install instructions etc [Aydin]

## What to Expect

running it, screenshot etc [Michael]

How we Verify

... [Aydin]

Look out for a deep dive article coming soon and more workshops to follow!

Thanks

PHPMinds talk, slides etc

  • Smash some slides together for the intro
  • Plan the event
    • Intro
    • How to build a workshop
    • How to run the workshop
    • Finishing comments etc

SSL Error

There is an ssl error on the site

Cache students current solution

We should cache the students current files so that if they close the browser or are redirected, they don't lose any code. We could use local storage for this, but some investigation is required.

Profile menu

We should display the users logo in the top right nav bar which when clicked, would open a drop down with a logout button, we could also display the current progress in the drop down.

Later on we can use this menu to control settings and house other links.

Blog post ideas

  • Constructing PHP code from AST nodes
  • Live patching and reverting of PHP code
  • How to set up a fake PHP webserver environment

Submit Page

@OliverChenery

Post to /submit to get validation results.

There are two sets of error messages. Basic form validation and workshop validation (where we validate the files in the actual workshop).

All responses are JSON. A failed response is a request that either failed form validation or workshop validation or both. A failed response will contain the following key success with a value of false.

A successful response will contain a success with a value of true.

Form validation fail example

Note that form errors come under the key form_errors. Maybe we can say something like "well the form validation passed but there were a few things wrong with the workshop", if the form passes but not the workshop.

Each field has a key and an array of messages. eg github-url. The field maps to the input name attribute. The key of each message is an indication of the validation performed, that can be ignored.

Request

POST /submit HTTP/1.1
Host: localhost:3000
frontend: 37prg85r517h731i6a2s7l6ir5
Cache-Control: no-cache
Postman-Token: 267dcb8f-0f02-d28e-f6f7-5fb2439aaf81
Content-Type: application/x-www-form-urlencoded

email=not-an-email&name=&github-url=www.google.com

Response

{
  "success": false,
  "form_errors": {
    "github-url": {
      "regexNotMatch": "The URL \"www.google.com\" is not a valid GitHub repository URL."
    },
    "email": {
      "emailAddressInvalidFormat": "The input is not a valid email address. Use the basic format local-part@hostname"
    },
    "name": {
      "isEmpty": "Value is required and can't be empty"
    }
  }
}

Workshop validation fail example

Note that when you receive these errors, the form actually passed validation but there was something wrong with the workshop in the GitHub link you submitted. These errors come under the key workshop_errors. Again, it is an array of arrays. You can ignore the keys and just display all the messages.

Request

POST /submit HTTP/1.1
Host: localhost:3000
frontend: 37prg85r517h731i6a2s7l6ir5
Cache-Control: no-cache
Postman-Token: e44180e9-67d8-773d-2e5c-aa27cfdbcab3
Content-Type: application/x-www-form-urlencoded

email=aydin%40hotmail.co.uk&name=Some+New+Workshop&github-url=https%3A%2F%2Fgithub.com%2Fphp-school%2Fcouch-db-check%2F

Response

{
  "success": false,
  "workshop_errors": {
    "type": {
      "isEmpty": "The \"type\" key in \"composer.json\" should be \"php-school-workshop\""
    },
    "bin": {
      "isEmpty": "The \"bin\" key in \"composer.json\" should be an array with one entry which points to the entry point of the workshop. For example: {\"bin\" : [\"bin/learnyouphp\"]}"
    }
  }
}

The above could just be displayed as (just showing how the data structure can be ignored):

<ul>
    <li>The \"type\" key in \"composer.json\" should be \"php-school-workshop\"</li>
    <li>The \"bin\" key in \"composer.json\" should be an array with one entry which points to the entry point of the workshop. For example: {\"bin\" : [\"bin/learnyouphp\"]}</li>
</ul>

Success example

Request

POST /submit HTTP/1.1
Host: localhost:3000
frontend: 37prg85r517h731i6a2s7l6ir5
Cache-Control: no-cache
Postman-Token: 99559aa3-df9a-c890-4ad2-6074e71a6541
Content-Type: application/x-www-form-urlencoded

email=aydin%40hotmail.co.uk&name=Some+New+Workshop&github-url=https%3A%2F%2Fgithub.com%2Fphp-school%2Flearn-you-php

Response

{
  "success": true
}

Redirect users when logged out

When a user performs an action in the editor, and they have been logged out, a error response is returned but nothing happens in the editor. We should provide some feedback or automatically redirect to the workshop list page.

File/folder delete is not implemented

Currently it is not possible to delete a folder/file via the file tree. It should be possible.

There is already a utility to provide a click handler for the delete icon so it's just a case of wiring it up and removing the element from the tree.

See the prop deleteFunction in FileTree.vue which is used in ExerciseEditor.vue

Fix main website build

The original gulp setup does not work anymore. It needs fixing.

Regarding svg, we should just copy them directly into the html instead of using easy-svg.

For the toolchain I'm not sure if we should use vite with a diff build or using something like parcel or webpack ?

Upgrade JS dependencies

There are reportedly some vulnerabilities in some of our locked packages. I tried to update them but there are breaking changes in gulp and I failed. Some help would be appreciated from someone more versed in JS tooling.

Closing a non active tab is boken

In the exercise editor, if you close a non-active tab, no tab is displayed at all. Closing a non-active tab should close only that tab, not the current one.

Docker issues

There are a few problems with the current docker setup.

  • Nginx fails to boot due to improper SSL config - we either need to remove or provide some certificates, I'm not sure what the correct way to do this - I also haven't looked so it might be simple. I just removed it to get it working for me locally.
  • Mysql is not working anymore - connection and logins are refused, locking the image to mysql 5.7 instead of latest and using a data volume seemed to fix it for me but it needs some proper investigation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.