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

Revert "Add Alerts to Iceberg's IceTipNewRepositoryPanel to Inform User of Incomplete Information" #1838

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions Iceberg-TipUI/IceTipGitProviderRepositoryPanel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -163,27 +163,12 @@ IceTipGitProviderRepositoryPanel >> userNameLabel [

{ #category : 'accessing' }
IceTipGitProviderRepositoryPanel >> validate [

self userName isNotEmpty
ifFalse: [
self alert: 'You must enter an owner (e.g. username).'.
^false].

"self
alert: 'You must enter a GitHub owner (e.g. username).'.

self
assert: self userName isNotEmpty
description: 'You must enter a GitHub owner (e.g. username).'."


self projectName isNotEmpty
ifFalse: [
self alert: 'You must enter a project name.'.
^false].
"self
alert: 'You must enter a GitHub owner (e.g. username).'.
description: 'You must enter a GitHub owner (e.g. username).'.
self
assert: self projectName isNotEmpty
description: 'You must enter a GitHub project name.'."

super validate.
^true.
description: 'You must enter a GitHub project name.'.
super validate
]
22 changes: 10 additions & 12 deletions Iceberg-TipUI/IceTipGitRepositoryPanel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,14 @@ IceTipGitRepositoryPanel >> validate [

| remoteString |
remoteString := self remoteUrl.
remoteString isNotEmpty ifFalse: [
self alert: 'You must enter your project url.'.
^ false ].
(IceGitRemote isValidUrl: remoteString) ifFalse: [
self alert: 'You must enter your project url.'.
^ false ].

self projectLocation location ifNil: [
self alert:
'Project location must be defined (if it does not exists, it will be created).'.
^ false ].
^ true
self
assert: remoteString isNotEmpty
description: 'You must enter your project url.'.
self
assert: (IceGitRemote isValidUrl: remoteString)
description: 'The url is incorrect.'.
self
assert: self projectLocation location isNotNil
description:
'Project location must be defined (if it does not exists, it will be created).'
]
21 changes: 5 additions & 16 deletions Iceberg-TipUI/IceTipNewRepositoryPanel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,10 @@ IceTipNewRepositoryPanel >> titleForWindow [
{ #category : 'accessing' }
IceTipNewRepositoryPanel >> validate [

self projectNameInputText text isNotEmpty ifFalse: [
self alert: 'You must enter a project name (it will be used also as part of the path).'.
^ false ].

self projectLocation location isNotNil ifFalse: [
self alert: 'You must enter a project name (it will be used also as part of the path).'.
^ false ].
^true.

"self
assert: self projectNameInputText text isNotEmpty
description:
'You must enter a project name (it will be used also as part of the path).'.
self
assert: self projectNameInputText text isNotEmpty
description: 'You must enter a project name (it will be used also as part of the path).'.
self
assert: self projectLocation location isNotNil
description:
'Project location must be defined (if it does not exists, it will be created).'"
assert: self projectLocation location isNotNil
description: 'Project location must be defined (if it does not exists, it will be created).'
]
13 changes: 1 addition & 12 deletions Iceberg-TipUI/IceTipRegisterRepositoryDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ Class {
#tag : 'View-Repository'
}

{ #category : 'actions' }
IceTipRegisterRepositoryDialogPresenter >> accept [

[
self doAccept ifFalse: [ ^ false ].
self closeWindow ]
on: IceError , IceWarning
do: [ :e |
e acceptError: (IceTipInteractiveErrorVisitor newContext: self) ]
]

{ #category : 'accessing' }
IceTipRegisterRepositoryDialogPresenter >> allTypes [

Expand All @@ -48,7 +37,7 @@ IceTipRegisterRepositoryDialogPresenter >> beForCloneOfRepository: aRepository [
IceTipRegisterRepositoryDialogPresenter >> doAccept [

| newRepository |
(self selectedType validate) ifFalse: [^false].
self selectedType validate.
self isEditing ifTrue: [ self selectedType repository: repository ].
newRepository := self selectedType newRepository.
self isEditing ifFalse: [ newRepository register ].
Expand Down
Loading