Page MenuHomePhabricator

QuickSurveys code quality
Closed, DuplicatePublic

Description

Notes from my general review:

General

  • The heart isn't centred (design review should cover any remaining problems
  • ~~Don't show the survey when the beta signup form is visible
    • The beta signup form isn't uniquely identified ~~ (thx @bmansurov)
  • No browser tests
  • No unit tests

QuickSurveys.hooks.php

  • No validation
    • No class that models an internal/external survey
    • No factory that creates the appropriate class from configuration
  • More sophisticated hooks can be broken out

Addressed in T110196.

ext.quicksurveys.init/init.js

  • Using jQuery to construct a DOM element that might not be necessary (only does it when survey available)
  • Rightwards drift
  • We hit local storage before testing two constants
  • Undocumented, untested insertion point selection see https://gerrit.wikimedia.org/r/236040
  • [ASSUMPTION] Is the ext.quicksurveys.views really that big that it's worth deferring it? [Discussing in T110200]

ext.quicksurveys.views module

  • Why can't we just use normal JavaScript class style? Is there a MediaWiki/Wikimedia style for defining JavaScript classes? [Discussing in T110200]
  • How does VE construct complex layouts? With Mustache?
  • The QuickSurvey.widget method is generic when it needn't be -- it's only used for the panels
  • The QuickSurvey.log method shouldn't be on a view
    • What does a view do?

Event Timeline

phuedx raised the priority of this task from to Needs Triage.
phuedx updated the task description. (Show Details)
phuedx subscribed.
Jhernandez added a project: Epic.
Jhernandez set Security to None.
Jhernandez subscribed.

Added blocked goal so that the task is easy to find. Also adding it to Reading-Web-Planning to plan it for next sprints.

@phuedx feel free to spin off subtasks for your notes blocking this epic during sprint 5, that way we'll move it hopefully to sprint 6 to address the tasks. Go crazy.

Set the priority as normal or high on the subtasks.

@phuedx or add the subtasks to sprint 55 https://phabricator.wikimedia.org/tag/reading-web-next-sprint-55/ before kickoff if you want to tackle them next sprint.

I'm fine with it.

Ping @Jdlrobson. Subtasking this and putting it on next sprint would be interesting.

phuedx updated the task description. (Show Details)

I think we should fix the bug with centering and beta sign up panels then organise a design review / engineering review to discuss the other points. @phuedx does that work for you?

@Jdlrobson: Sure. Please remember that these are just notes, as I said in the Reading-Web-Sprint-55-π kick off meeting. Everyone should feel free to disagree/ask for clarification/whatever on any/all of the bullet points.

Captured discussion points in T110194 hope that's okay! Let's continue conversation over there!