php-school / phpschool.io Goto Github PK
View Code? Open in Web Editor NEW🌍 PHP School Website http://www.phpschool.io/
License: Apache License 2.0
🌍 PHP School Website http://www.phpschool.io/
License: Apache License 2.0
Fix pls
Talk to be given at the event prior to our main event as a small intro as to what is happening.
Intro [Together]
bullet list / general overview [Michael]
install instructions etc [Aydin]
## What to Expect
running it, screenshot etc [Michael]
... [Aydin]
Look out for a deep dive article coming soon and more workshops to follow!
Thanks
Currently users are logged out too soon. We should make the sessions last longer.
There is an ssl error on the site
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.
https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.phpschool.io%2F
There are quite a few recommendations we can use to improve the performance of the site, anyone wanting to take a stab at this, feel free!
It's likely a non-php issue though since code below is correct
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.
Maybe it would be cool to display the total progress eg 1 out of 24 in the status bar of the exercise editor, like how we do on the workshop list page.
return [
Mean::class => \DI\Object(),
];
should be lowercase object
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
.
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.
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
{
"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"
}
}
}
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.
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
{
"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>
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
{
"success": true
}
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.
Less information overload this way.
Have "Next" links at the bottom of each section. Eg: Ok, now you’re ready to modify the theme
It's currently not possible to render the ComposerCheck results in a unique way since it uses the generic failure result.
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
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 ?
We seemed to have missed vital requirements from the homepage, which will hinder users just getting started.
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.
Do not allow adding packages that do not have any releases.
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.
There are a few problems with the current docker setup.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.