Titanium JIRA Archive
Alloy (ALOY)

[ALOY-682] Alloy: Prevent default ID for a view's root element to be used by child element

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-07-12T00:58:01.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 14, 2013 Sprint 12
ComponentsXML
Labelscommunity, qe-closed-3.1.2, qe-testadded
ReporterCarter Lathrop
AssigneeTony Lukasavage
Created2013-05-31T07:36:59.000+0000
Updated2013-08-19T07:23:04.000+0000

Description

By default, the first root-level element of a view will get the view's name as ID. If you assign the same ID to a child element, this will result in conflicts. I would suggest a simple check to be made by the compiler, which I will add as a PR soon.

Comments

  1. Tony Lukasavage 2013-06-06

    PR: https://github.com/appcelerator/alloy/pull/148 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-682 To functionally test: * Run the test app and ensure that it compiles and loads without error * Modify "app/views/index.xml" and add id="index" to the
  2. Tony Lukasavage 2013-07-12

    After inspecting a few apps, making this a hard error at compile time is causing a lot of issues with existing apps and would require significant refactoring in some. I am going to keep the check in place, but make it a warning message instead of a breaking error.
  3. Tony Lukasavage 2013-07-12

    PR: https://github.com/appcelerator/alloy/pull/175 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-682 To functionally test: * Run the test app and ensure that it compiles and loads without error * Check the alloy compile log. Ensure that you see 2 warnings about using the default ID. One warning from the "index" view, one warning from the "another" view.
  4. Federico Casali 2013-07-12

    Verified as fixed on Android and iOS devices. Environment: Titanium SDK 3.1.2.v20130710144553 Appcelerator Studio 3.1.2.201307101037 Alloy 1.2.0 Closing
  5. Fokke Zandbergen 2013-08-19

    I see that the warning is given even if the top-level element has another ID then the default one. I think in that case the warning should not be given.

JSON Source