Giter Club home page Giter Club logo

spec's Introduction

Spec

Spec is a framework in Pharo for describing user interfaces.

Spec-Pharo-Integration
Spec-dev

Install Spec

Spec is included in any regular Pharo image.
It is possible to load the latest version executing following script:

    Metacello new
        repository: 'github://pharo-spec/Spec';
        baseline: 'Spec2';
        onConflict: [ :e | e useIncoming ];
        onUpgrade: [ :e | e useIncoming ];
        ignoreImage;
        load

spec's People

Contributors

570gina avatar adri09070 avatar arturozambrano avatar astares avatar balsa-sarenac avatar cafekrem avatar clotildetoullec avatar colorow avatar demarey avatar dionisiydk avatar ducasse avatar estebanlm avatar guillep avatar inao0 avatar janbliznicenko avatar jecisc avatar jordanmontt avatar juliendelplanque avatar marcusdenker avatar noha avatar nourjihene avatar pavel-krivanek avatar privat avatar rinzwind avatar sbragagnolo avatar stephaneggermont avatar stevencostiou avatar tesonep avatar tinchodias avatar tomooda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spec's Issues

Spec is missing an InputNumber

It would be cool to have a component for input number like in HTML5.

It would accept only numbers and would have two arrows to go up or down.

SpecInterpreter has useless checks

There is this piece of code in the spec interpreter but I checked with the tools in the image and all the tests, if there is a string here, it is always #model.

(aFragment isString or: [ aFragment isText ])
		ifTrue: [ 
			^ aFragment == #model
				ifTrue: [ self presenter ]
				ifFalse: [ self convertSymbolOfClassToInstance: aFragment ] ].

We can simplify the code

WindowPresenter title managment can be improved

Currently, #aboutTitle uses #respondsTo: to check if a tool defines a specific tool name.

Instead of this, we could implement a #toolName method directly on the abstract presenter of Spec.

change "value holders" with slots?

I think we may benefit a lot by using slots instead populating all presenters with value holder objects all around.
Yes, this is just a way to "hide" the behaviour. But having a property slot will make everything cleaner.

CI sometime crash because of Spec

I the CI often get some error saying that taskbarIcon was not understood by smallinterger.

I cannot reproduce on my laptop.

I'll probably do a fake PR with logs.

Some SpecInterpreter code seems unreachable

In the SpecInterpreter there is this code:

selector isArray
		ifFalse: [ selector := selector asSymbol.
			numArgs := selector numArgs.
			args := arrayToInterpret copyFrom: index + 1 to: index + numArgs ]
		ifTrue: [ "Here I assume that if it's not a symbol, it's a collection"
			| array |
			array := selector.
			selector := array first.
			numArgs := 0.
			args := array allButFirst ].

But in all tests and interfaces present in the image, the selector is never an array. I'll remove this check and add an assertion to point to this issue if one day we get an array.

SpecWrapper seems useless to me

SpecInterpreter returns instances of SpecWrapper but I have the impression this is useless.

I'll do a PR to remove it and I would like someone with some Spec knowledge (Esteban?) to review it.

ComposablePresenter>>registerKeyStrokesForNextFor: references to Morphic implementation

This implementation:

registerKeyStrokesForNextFor: aWidget

	aWidget ifNil: [ ^ self ].
	
	self eventKeyStrokesForNextFocus do: [:each |
		aWidget bindKeyCombination: each toAction: [ self giveFocusToNextFrom: self ] ]

Assumes "widget" is a Morphic widget.
While we can demand that api from any component we use, I think this violates proper layering.

Maybe we should kick this into the adapter?
Or we just accept is like that?

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.