Skip to content

Commit

Permalink
Merge pull request #5624 from afwillia/SWC-7167
Browse files Browse the repository at this point in the history
SWC-7167 - project search button mobile text
  • Loading branch information
afwillia authored Feb 5, 2025
2 parents 85f6c4b + 81735b8 commit aa06bf8
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,15 @@ public interface ProfileViewImplUiBinder
@UiField
Button teamSearchButton;

@UiField
Button teamSearchButtonSmall;

@UiField
Button projectSearchButton;

@UiField
Button projectSearchButtonSmall;

// Challenges
@UiField
FlowPanel challengesTabContent;
Expand Down Expand Up @@ -264,12 +270,15 @@ public ProfileViewImpl(
}
});

teamSearchButton.addClickHandler(event ->
presenter.goTo(new TeamSearch(teamSearchTextBox.getValue()))
);
projectSearchButton.addClickHandler(event ->
presenter.goTo(new Search(getCurrentProjectSearchJSON()))
);
ClickHandler teamSearchHandler = event ->
presenter.goTo(new TeamSearch(teamSearchTextBox.getValue()));
teamSearchButton.addClickHandler(teamSearchHandler);
teamSearchButtonSmall.addClickHandler(teamSearchHandler);

ClickHandler projectSearchHandler = event ->
presenter.goTo(new Search(projectSearchTextBox.getValue()));
projectSearchButton.addClickHandler(projectSearchHandler);
projectSearchButtonSmall.addClickHandler(projectSearchHandler);

moreChallengesButton.addClickHandler(event -> presenter.getMoreChallenges()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ public interface SearchViewImplUiBinder
@UiField
Button searchButton;

@UiField
Button searchButtonSmall;

private List<Button> facetButtons;
private SynapseJSNIUtils synapseJSNIUtils;
private PortalGinInjector ginInjector;
Expand All @@ -130,14 +133,10 @@ public SearchViewImpl(
this.dateTimeUtils = dateTimeUtils;
this.markdownIt = markdownIt;
headerWidget.configure();
searchButton.addClickHandler(
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.setSearchTerm(searchField.getText());
}
}
);
ClickHandler searchHandler = event ->
presenter.setSearchTerm(searchField.getValue());
searchButton.addClickHandler(searchHandler);
searchButtonSmall.addClickHandler(searchHandler);
searchField.addKeyDownHandler(
new KeyDownHandler() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
ui:field="projectSearchButton"
text="Search All Projects"
icon="SEARCH"
visibleOn="SM_MD_LG"
/>
<b:Button
ui:field="projectSearchButtonSmall"
icon="SEARCH"
visibleOn="XS"
/>
</b:InputGroupButton>
</b:InputGroup>
Expand Down Expand Up @@ -214,6 +220,12 @@
ui:field="teamSearchButton"
text="Search All Teams"
icon="SEARCH"
visibleOn="SM_MD_LG"
/>
<b:Button
ui:field="teamSearchButtonSmall"
icon="SEARCH"
visibleOn="XS"
/>
</b:InputGroupButton>
</b:InputGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,29 @@
<div class="row">
<div class="col-md-12">
<MUI:Grid container="true">
<MUI:Grid md="9">
<MUI:Grid xs="10" md="9">
<b:InputGroup width="100%">
<b:TextBox
ui:field="searchField"
addStyleNames="form-control input-lg search-textbox"
/>
</b:InputGroup>
</MUI:Grid>
<MUI:Grid md="3">
<MUI:Grid xs="2" md="3">
<b:Button
ui:field="searchButton"
block="true"
size="LARGE"
text="Search"
icon="SEARCH"
visibleOn="SM_MD_LG"
/>
<b:Button
ui:field="searchButtonSmall"
block="false"
size="LARGE"
icon="SEARCH"
visibleOn="XS"
/>
</MUI:Grid>
</MUI:Grid>
Expand Down

0 comments on commit aa06bf8

Please sign in to comment.