-
Notifications
You must be signed in to change notification settings - Fork 6.6k
feat(demosite): add gamified demosite #8857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(demosite): add gamified demosite #8857
Conversation
7def2da
to
2794470
Compare
- Updates demosite pages to add examples - Updates visual design and layout of examples Still work in progress: - Visual design - Layout - Interaction design - Copy - Replace checkbox examples - Add game
2794470
to
08d2136
Compare
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
function createAssessment({ action, sitekey, token }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used? There is an example assessment call from the backend here
https://github.com/GoogleCloudPlatform/python-docs-samples/blob/demosite-app-recaptcha/recaptchaenterprise/samples/demosite/app/backend/create_assessment.py
Though if this pull request is mostly to focus on the actual contents and routing of the site, then we can focus on the actual API integration in a follow-up pull request. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I think I'm following now. createAssessment
makes a request to /create_assessment
which is then handled by execute_create_assessment
. That works, I just had to catch up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! This is where the browser calls that backend endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the Python code and I don't see any problems with it.
Just remember that once you want to finally merge it to main
, please write exactly how and to what you want this SITE_KEY
env variable set in the PR description, so the test project owners can configure it properly in the test projects :)
* docs(recaptcha-samples): init add demosite * Update docker-compose.yaml * Update docker-compose.yaml * Change default port from 8000 to 8080. (#9043) * Change default port from 8000 to 8080. * Add Apache license to docker-compose.yaml * feat(demosite): add gamified demosite (#8857) * feat: update demosite pages and theme - Updates demosite pages to add examples - Updates visual design and layout of examples Still work in progress: - Visual design - Layout - Interaction design - Copy - Replace checkbox examples - Add game * feat: update app urls * add license headers Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> * refactored to remove comments and print statements * Demosite app recaptcha (#9068) * chore: cleanup todos * feat: cleanup checkboxes and draft copy * chore: fix simple example, animate results, game placeholder * chore: correct checkbox keys and add game route * moved context to global --------- Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> * removed checkbox references from dockerfile * refactor create assessment call * fix score display issue * refactor to demonstrate site_key best practice * Round score to the first decimal; scores never have a second decimal anyway, and the way it is truncated in the frontend can lead to the wrong value displayed (0.8 instead of 0.9 for a value of 0.89999999) (#9105) * add headers * lint fix * lint * fix typo * added newline * Add an optional DOCKER_COMPOSE_USER environment variable. This can be helpful such that files get created by the same user that is running docker (#9130) * updated README and verdict in assessment. Added comment in dockerfiles --------- Co-authored-by: Cory Kramer <corykramer@google.com> Co-authored-by: Rhy Moore <git@morewry.me> Co-authored-by: Francois Aube <faube@google.com> Co-authored-by: nicain <nicholascain@google.com>
* docs(recaptcha-samples): init add demosite * Update docker-compose.yaml * Update docker-compose.yaml * Change default port from 8000 to 8080. (#9043) * Change default port from 8000 to 8080. * Add Apache license to docker-compose.yaml * feat(demosite): add gamified demosite (#8857) * feat: update demosite pages and theme - Updates demosite pages to add examples - Updates visual design and layout of examples Still work in progress: - Visual design - Layout - Interaction design - Copy - Replace checkbox examples - Add game * feat: update app urls * add license headers Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> * refactored to remove comments and print statements * Demosite app recaptcha (#9068) * chore: cleanup todos * feat: cleanup checkboxes and draft copy * chore: fix simple example, animate results, game placeholder * chore: correct checkbox keys and add game route * moved context to global --------- Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com> * removed checkbox references from dockerfile * refactor create assessment call * fix score display issue * refactor to demonstrate site_key best practice * Round score to the first decimal; scores never have a second decimal anyway, and the way it is truncated in the frontend can lead to the wrong value displayed (0.8 instead of 0.9 for a value of 0.89999999) (#9105) * add headers * lint fix * lint * fix typo * added newline * Add an optional DOCKER_COMPOSE_USER environment variable. This can be helpful such that files get created by the same user that is running docker (#9130) * updated README and verdict in assessment. Added comment in dockerfiles --------- Co-authored-by: Cory Kramer <corykramer@google.com> Co-authored-by: Rhy Moore <git@morewry.me> Co-authored-by: Francois Aube <faube@google.com> Co-authored-by: nicain <nicholascain@google.com>
* feat: update demosite pages and theme - Updates demosite pages to add examples - Updates visual design and layout of examples Still work in progress: - Visual design - Layout - Interaction design - Copy - Replace checkbox examples - Add game * feat: update app urls * add license headers Co-authored-by: Sita Lakshmi Sangameswaran <sitalakshmi@google.com>
Still work in progress:
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9
(see Test Environment Setup)nox -s lint
(see Test Environment Setup)