Code Monkey home page Code Monkey logo

Comments (2)

grochocki avatar grochocki commented on July 22, 2024

We've declined requests in the past for column break rules (#12), since while column break rules might work for most languages, we did not believe it made as much sense for a markup language like XAML that make use of heavy nested elements, but if this new setting was based on element length (and not line length), that starts to feel to me like a consistent alternative to Max Attribute Characters Per Line.

What are your thoughts on conflict resolution behavior between this new proposed setting and Max Attribute Characters Per Line?

from xamlstyler.

mrlacey avatar mrlacey commented on July 22, 2024

What are your thoughts on conflict resolution behavior between this new proposed setting and Max Attribute Characters Per Line?

I would have this new setting take priority over MACPL as it considers the element as a whole, rather than just a subset. Actually, I would have this new setting override all (I think--but I haven't double-checked) other settings.
What I want from this option is the ability to say something equivalent to "in this specific situation, do this specific thing, but if this situation is not met, then follow the existing rules."
Having a new setting related to overall element length work in combination with other, existing settings would increase the complexity of the internal code as well as make it harder to reason over what results different combinations of settings will produce.
As a completely separate new setting, this also avoids any unexpected confusion and complication by possibly changing existing settings/behavior.

This new setting should default to a value of -1 and only be considered if greater than 0. (Yes, even though there's a theoretical minimal size of 13 before it could have a meaningful/useful effect.)

While I'm only proposing a single new setting that takes priority over all others, I recognize that this sets a precedent for potentially adding others in the future and that having multiple settings that each take priority over general settings introduces other challenges. I don't believe this should be a blocker, though, as there are ways of prioritizing multiple settings that may take priority, and these can be applied as and when this becomes a factor.

from xamlstyler.

Related Issues (20)

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.