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

SWC-7167 - project search button mobile text #5624

Merged
merged 7 commits into from
Feb 5, 2025
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
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"
/>
afwillia marked this conversation as resolved.
Show resolved Hide resolved
</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"
afwillia marked this conversation as resolved.
Show resolved Hide resolved
/>
</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"
afwillia marked this conversation as resolved.
Show resolved Hide resolved
block="false"
size="LARGE"
icon="SEARCH"
visibleOn="XS"
/>
</MUI:Grid>
</MUI:Grid>
Expand Down