Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some elements stays in the window when switching url #86

Open
duanshiqiang opened this issue Jul 31, 2015 · 1 comment
Open

Some elements stays in the window when switching url #86

duanshiqiang opened this issue Jul 31, 2015 · 1 comment

Comments

@duanshiqiang
Copy link

Elements like progress won't disappear when switching url inside an app. Images with move method called will also stick there.

Currently what I do to circumvent this issue is move these kind of elements to a hidden coordination which is very ugly.

Code:

require "green_shoes"

class Test < Shoes
    url '/',        :home
    url '/page1',   :page1
    def home
        stack :width => 400, :height => 100 do
            progress
        end
        stack :width => 400, :height => 200 do
            button "Next" do
                visit "/page1"
            end
        end
    end
    def page1
        para "This is page1"
    end 
end

Shoes.app :width => 400, :height => 300, :title => "My test App"

My ugly way to remove the element:

require "green_shoes"

class Test < Shoes
    url '/',        :home
    url '/page1',   :page1
    def home
        stack :width => 400, :height => 100 do
            @p = progress
        end
        stack :width => 400, :height => 200 do
            button "Next" do
                @p.move 0, -200
                visit "/page1"
            end
        end
    end
    def page1
        para "This is page1"
    end 
end

Shoes.app :width => 400, :height => 300, :title => "My test App"
@duanshiqiang
Copy link
Author

Currently I am investigating Green Shoes to build a install wizard like app which serves like an installer for our product. The app is basically a multi-page app that gathers some input from user and then call an external script to trigger the actual installation process.

So elements like progress that are stick to the window is very annoying...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant