thiemowmde added a comment. |
- [Bug] Fix error in incurrent Lexeme view
- It straight goes to edit mode when calling a Lexeme page, and editing does not work as expected
- [Task] Write browser test as seen in the ticket
- Including all support files.
- Expectation is that the browser test runs without errors, with the new test failing.
- This tasks includes comming up with a naming scheme for the HTML elements under test.
- Suggestion is something like "wikibase-lexeme-…".
- Decision: never use IDs in HTML, only class names.
- Acceptance criteria is as follows: If I comment out the failing browser test line, the next should fail with a useful error message. And so on. If all are commented out, the test should succeed (with being empty).
- [Task] Introduce HTML templates infrastructure
- Key element is a new templates.php file, and a RessourceLoader module. Copy-paste from Wikibase.git.
- Try to reuse code from Wikibase.git if it makes sense.
- The templates list is (almost) empty, and the templating is unused at this point. Do not touch existing view code in this patch.
- Add a comment that suggests a clean naming scheme, e.g. each template name starts with "wikibase-lexeme-…".
- [Task] Move existing HTML from views to templates.php
- Note: May not make sense for all HTML. Focus on extracting HTML that is actually needed in JS.
- [Task] Create "formlist" widget for list of Forms
- This is a subclass of the existing listview JS code.
- Does not need to create it's own HTML. Keep it simple and do not implement this if it is not needed. Always instantiate on top of existing HTML pre-rendered via the backend.
- This widget takes care of adding and displaying the Form added via "add".
- This widget will later have a "remove" feature. Not part of the current story. Just keep this in mind.
- [Task] Implement Form widget as shown in M210
- Must support view as well as edit mode.
- Should be able to instantiate on top of existing HTML pre-rendered via the backend, as well as create it's own HTML using a template.
- Super-trivial with nothing but an input field for a single representation.
- No input for gramatical role or anything.
- No input for ID.
- Note: We did investigation if existing JQuery UI modules can be reused for the new widgets. We had a look at ValueView as well as terms widgets. Conclusion: Create a new subclasses of EditableTemplatedWidget. Use labelview as a blueprint, but do not copy everything. Reuse elements that make sense. Start with a straight <input> field.
- Note: We may use OOJS elements later. Do not do this for this story, but keep it in mind.
- [Task] Create an "add" button to add a Form to a list of Forms
- This uses the toolbar infrastructure.
- In the first patch the button doesn't do anything.
- Note: It might not be possible to split this from the next task that wires the add button.
- Make sure the browser test succeeds at this step.
- [Task] Make the "add" button display the "add Form" form
- This patch creates the wiring to the Form widget previously created.
- [Task] Make the "save" button add the new form to the list widget
- This patch creates the wiring to the "FormList" widget previously created.
- [Task] Assign an ID to each new Form
- In the first patch this is allowed to reuse old numbers.
TASK DETAIL
EMAIL PREFERENCES
To: thiemowmde
Cc: thiemowmde, Jan_Dittrich, Jonas, Aklapper, QZanden, D3r1ck01, Izno, Wikidata-bugs, aude, Darkdadaah, Mbch331
Cc: thiemowmde, Jan_Dittrich, Jonas, Aklapper, QZanden, D3r1ck01, Izno, Wikidata-bugs, aude, Darkdadaah, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs