Bug 8511

Summary: Import layer page, "Add layer" button remains enabled when layer text input is empty
Product: [Build System, Metadata & Runtime] Toaster Reporter: Elliot Smith <elliot.smith>
Component: toasterAssignee: Elliot Smith <elliot.smith>
Status: VERIFIED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: normal    
Priority: Low CC: belen.barros.pena, jessica.zhang, stanciux.mihail
Version: 2.1   
Target Milestone: 2.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Elliot Smith 2015-10-14 12:51:52 UTC
The "Add layer" button on the Import layer page remains enabled even if the text input is empty. This could result in a user accidentally adding the wrong layer to their project.

To reproduce:

1. Start Toaster and create a new project.
2. Go to the dashboard for that project (click on the project's name in the All projects table).
3. Open the "Import layer" tab for the project.
4. Scroll down to the "Layer dependencies" section. Note that the "Add layer" button is disabled.
5. Start typing a layer name into the text input, e.g. "e100". Some typeahead entries should be shown, including e100-bsp. Click on that to select it. The "Add layer" button becomes enabled.
6. Delete all of the "e100-bsp" text from the text input by selecting it and pressing Backspace.

Expected:

The "Add layer" button is disabled, as there is no layer name in the text input any more.

Actual:

The "Add layer" button remains active. Clicking on it adds the last-selected layer (e100-bsp in this case).


Note that this is similar to bug 8449 and probably has a similar root.
Comment 1 Elliot Smith 2016-03-29 10:11:32 UTC
Tested on toaster-next, and this bug is still present.
Comment 2 Elliot Smith 2016-04-07 13:22:08 UTC
Implemented fix; review request at https://lists.yoctoproject.org/pipermail/toaster/2016-March/004335.html
Comment 3 Elliot Smith 2016-04-19 11:11:50 UTC
Now that the Bootstrap 3 work has been put aside momentarily, I sent a reminder to review this:
https://lists.yoctoproject.org/pipermail/toaster/2016-April/004468.html
Comment 4 Elliot Smith 2016-04-21 11:05:55 UTC
Now in bitbake master.
Comment 5 Libertad 2016-05-10 21:42:40 UTC
This was verified in 2.1-M4-RC2