Skip to content

Commit

Permalink
Merge pull request #235 from DuneSt/jecisc-patch-2
Browse files Browse the repository at this point in the history
v2.1.0
  • Loading branch information
jecisc committed Feb 7, 2019
2 parents d65748d + 4409020 commit b9029d6
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 9 deletions.
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ os:
#- osx

smalltalk:
- Pharo-7.0
- Pharo-6.1
- Pharo64-8.0
- Pharo64-7.0
- Pharo64-6.1
#- GemStone-3.4.1

matrix:
fast_finish: true

# This make Gemstone builds 3x faster
#cache:
# directories:
# - $SMALLTALK_CI_CACHE
allow_failures:
- smalltalk: Pharo64-8.0

# This make Gemstone builds 3x faster
#cache:
# directories:
# - $SMALLTALK_CI_CACHE
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<!--git log --pretty="* %s ([%h](https://github.com/DuneSt/MaterialDesignLite/commit/%H))" v1.3.2...HEAD-->


# [v2.1.0](https://github.com/DuneSt/MaterialDesignLite/compare/v2.0.1...v2.1.0) (2019-02-07)

## Feature

* Allow to set tooltip position on MDLMenuButtonWidget ([244a38a](https://github.com/DuneSt/MaterialDesignLite/commit/244a38a1f69bd37c94febe044661ab7b17fd677d))

## Infastructure

* Enable Pharo 8 on CI with allowed fasilures ([c93b7a3](https://github.com/DuneSt/MaterialDesignLite/commit/c93b7a3e302fd0b615f3c1c7f7f7ea3f5b9ac870))

# [v2.0.1](https://github.com/DuneSt/MaterialDesignLite/compare/v2.0.0...v2.0.1) (2019-01-24)

## Infastructure
Expand Down
2 changes: 1 addition & 1 deletion src/Material-Design-Lite-Demo/MDLDemo.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ MDLDemo class >> open [

{ #category : #versions }
MDLDemo class >> version [
^ 'v2.0.1'
^ 'v2.1.0'
]

{ #category : #hooks }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,38 @@ MDLMenuButtonWidgetTests >> testButtonContents [
self assert: [ :html | menu renderButtonContentOn: html ] generates: '<i class="material-icons">mood</i>'
]

{ #category : #tests }
MDLMenuButtonWidgetTests >> testDefaultDescriptionPositionAtBottom [
self assert: menu descriptionPosition equals: #bottom
]

{ #category : #tests }
MDLMenuButtonWidgetTests >> testDescriptionAtBottom [
menu descriptionAtBottom.

self assert: menu descriptionPosition equals: #bottom
]

{ #category : #tests }
MDLMenuButtonWidgetTests >> testDescriptionAtLeft [
menu descriptionAtLeft.
menu description: 'Description'.
self assert: menu descriptionPosition equals: #left.
self assert: [ :html | html render: menu ] generatedIncludes: 'mdl-tooltip--left'
]

{ #category : #tests }
MDLMenuButtonWidgetTests >> testDescriptionAtRight [
menu descriptionAtRight.
self assert: menu descriptionPosition equals: #right
]

{ #category : #tests }
MDLMenuButtonWidgetTests >> testDescriptionAtTop [
menu descriptionAtTop.
self assert: menu descriptionPosition equals: #top
]

{ #category : #tests }
MDLMenuButtonWidgetTests >> testLabelFor [
menu textBlock: nil.
Expand Down
38 changes: 37 additions & 1 deletion src/Material-Design-Lite-Widgets/MDLMenuButtonWidget.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Class {
'description',
'action',
'sortBlock',
'buttonContent'
'buttonContent',
'descriptionPosition'
],
#category : #'Material-Design-Lite-Widgets-Menu'
}
Expand Down Expand Up @@ -134,6 +135,40 @@ MDLMenuButtonWidget >> description: anObject [
description := anObject
]

{ #category : #options }
MDLMenuButtonWidget >> descriptionAtBottom [
"Sets the description of the menu at its bottom."
self descriptionPosition: #bottom
]

{ #category : #options }
MDLMenuButtonWidget >> descriptionAtLeft [
"Sets the description of the menu at its left."
self descriptionPosition: #left
]

{ #category : #options }
MDLMenuButtonWidget >> descriptionAtRight [
"Sets the description of the menu at its right."
self descriptionPosition: #right
]

{ #category : #options }
MDLMenuButtonWidget >> descriptionAtTop [
"Sets the description of the menu at its top."
self descriptionPosition: #top
]

{ #category : #accessing }
MDLMenuButtonWidget >> descriptionPosition [
^ descriptionPosition ifNil: [ descriptionPosition := #bottom ]
]

{ #category : #accessing }
MDLMenuButtonWidget >> descriptionPosition: anObject [
descriptionPosition := anObject
]

{ #category : #private }
MDLMenuButtonWidget >> labelFor: anObject [
^ self textBlock ifNil: [ anObject asString ] ifNotNil: [ :tb | tb cull: anObject ]
Expand Down Expand Up @@ -206,6 +241,7 @@ MDLMenuButtonWidget >> renderTooltipOn: html [
html mdlTooltip
for: self id;
large;
position: self descriptionPosition;
with: self description
]

Expand Down

0 comments on commit b9029d6

Please sign in to comment.