Git Product home page Git Product logo

Comments (12)

andyfitz avatar andyfitz commented on July 28, 2024

+1

But of course I'd be in favour of this.

On 28/09/2012, at 12:57 AM, Jirka Tomasek [email protected] wrote:

PROS & CONS:

we get nice restful solution ready to support js and non-js responses
get rid of the get_string() method and related helpers, it will not matter
which translation solution we use.

Katello will have to update it's solution to changes done in converge-ui

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Does this get rid of the slide in card animation for those pages entirely? Or only on the non-js version?

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

The slide in animation can be done with js but slightly different. If you click on eg. "forgot password" link (which will be :remote => true), the password_resets#new action responds with new.js.erb which will render the correct partial as well as can include any js code which can take care of animating the partial however we want. (The thing we will always render is the .card div and its content)

So the answer to your question is: We will have the slide in card animation in js version.

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Feels a bit heavy handed for the JS version to go to the server to retrieve that partial. I suppose on a production machine this might be unnoticeable. Requesting partial chunks of HTML + JS from the server has and still does feel weird to me. I'd be more inclined to grab the data in a lightweight form like JSON and generate the view from JS or compose a view from some of the partials for the JS version. While I realize that this a small section of elements compared to the entirety of what is to come, I feel this could be worth discussion in general for future layouts we include.

from ui_alchemy-rails.

knowncitizen avatar knowncitizen commented on July 28, 2024

Might be a good time to consider js templates?

from ui_alchemy-rails.

ifarkas avatar ifarkas commented on July 28, 2024

In Conductor we are using mustache.js. These partials can be rendered by both in JS on client side and in Rails on the server side.

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

Can they be written in HAML and rendered for either usage? I have used mustache and handlebars in the past (had more success with handlebars due to weird browser issues I saw with mustache) and liked them as a style.

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

Are you okay with me to start to work on non-js version and adding the js enhancements/functionality later when we resolve the way we implement it? Do you intend to have the non-js version in Katello too, or you want to just depend on the javascript here?

As far as I am okay to use json and js templates way, for me it is much more straightforward to implement the functionality with use of js.erb's (js.haml's) first, as it involves almost no additional code to the non-js version. So I could implement it this way and then when we agree on how we'll work with the templates etc, we can implement it...

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

Also looking at the Katello source, you are using js responses using js.haml views quite extensively, so my approach also fits this.

from ui_alchemy-rails.

ehelms avatar ehelms commented on July 28, 2024

@knowncitizen Thoughts here with the way the interstitial works? I feel like the solution needs to provide the smoothest transition to a non-js or retention of the current JS version so we aren't spending extra cycles porting our login implementation over again. I may be over-estimating the amount of work that could be.

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

If I am correct, the interstitial view is rendered as partial into login_layout now, so it fits the paradigm of splitting the login_layout into separate partials, with the exception that the interstitial is not in converge-ui but in Katello. The controller side is up to you.

So basically what I think you'd have to do to Katello is add the password_resets#new and password_resets#new_username_retrieval actions and views (or take the username_retrieval to new controller) to take care of displaying the related partials (as there is no login_layout any more). Then if you want, you can add respond_to html format to your actions.

I might not be completely correct as I am not sure how interstitial works...

from ui_alchemy-rails.

jtomasek avatar jtomasek commented on July 28, 2024

Closing the Issue, feature implemented. https://github.com/Katello/converge-ui/pull/92

from ui_alchemy-rails.

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.