Giter VIP home page Giter VIP logo

Comments (3)

xf- avatar xf- commented on September 28, 2024

this is generated stuff from widgets.
shouldn't be to hard to improve.
Looks like Hex is used 0-f

e.g if this regex is matched it is your value.
([0-9a-f]{14}.[0-9a-f]{8})

Maybe the ids behave differently depending on nesting...

from flll.

NamelessCoder avatar NamelessCoder commented on September 28, 2024

@xf- I think the problem (or rather cause) is that the template in question:

  • Declares a dynamic "name" for the object
  • Does not declare a "label"; neither hardcoded or as fixed LLL:EXT:... or LLL:name reference

What we would be doing by preventing the generating of labels in EXT:flll would just be treating this symptom and it really is hacky. We can't predict if the next use case uses another way to make the "name" dynamic and we'd just have to support that, too. Instead of fixing it at the source.

I suggest telling the template author to use label="LLL:nameOfKey" on the sections/objects/fields which have dynamic names. This ensures that the data is saved with dynamic indexes, but when resolving the label, Flux detects the "LLL:" prefix and instead of building the expected key according to nesting etc., it will look up that value directly - thus completely preventing this problem regardless of the nature of the dynamic "name".

PS: the name in this case would case some strange effects when "thawed" from XML to an array. An additional nesting would be added because the dynamic part contains a . - either that, or there are two dynamic segments at work here. The "LLL:" solution will also prevent that but you may need to add the "label" in more than just the one place - depending on the template.

from flll.

NamelessCoder avatar NamelessCoder commented on September 28, 2024

Will take the liberty of closing this and the related PR with reference to the "proper" solution described above. Although it entails a bit more work it also results in a much better solution where the LLL reference is predictable and reusable.

from flll.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.