Skip to content

Some elements stays in the window when switching url #86

Description

@duanshiqiang

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"

Activity

  1. duanshiqiang commented on Jul 31, 2015

    @duanshiqiang
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions