mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 22:37:15 +00:00
Regatta overview integration which can be enabled/disabled via
experimental features flag
This commit is contained in:
1 parent
6fde74c71b
commit
7ea1aec358
7 files changed
+27
-11
No files matched your search
+2
-2
@@ -61,8 +61,8 @@ public class RegattaStatus extends Composite implements RefreshableWidget<Regatt
|
||||
}
|
||||
|
||||
private RegattaStatusRegatta addRegatta(MobileSection container, RegattaMetadataDTO regatta) {
|
||||
PlaceNavigation<?> placeNavigation = ExperimentalFeatures.SHOW_RACES_ON_MOBILE ?
|
||||
presenter.getRegattaRacesNavigation(regatta.getId()) : presenter.getRegattaMiniLeaderboardNavigation(regatta.getId());
|
||||
PlaceNavigation<?> placeNavigation = ExperimentalFeatures.SHOW_REGATTA_OVERVIEW_ON_MOBILE ?
|
||||
presenter.getRegattaOverviewNavigation(regatta.getId()) : presenter.getRegattaMiniLeaderboardNavigation(regatta.getId());
|
||||
RegattaStatusRegatta regattaWidget = new RegattaStatusRegatta(regatta, placeNavigation);
|
||||
container.addContent(regattaWidget);
|
||||
return regattaWidget;
|
||||
|
||||
+6
@@ -18,6 +18,7 @@ import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.multiregatta.tabs.MultiregattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaMediaPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.fakeseries.SeriesContext;
|
||||
import com.sap.sailing.gwt.home.mobile.app.MobileApplicationClientFactory;
|
||||
@@ -165,6 +166,11 @@ public abstract class AbstractEventActivity<PLACE extends AbstractEventPlace> ex
|
||||
return null;
|
||||
}
|
||||
|
||||
public PlaceNavigation<?> getRegattaOverviewNavigation(String regattaId) {
|
||||
EventContext ctx = new EventContext(getCtx()).withRegattaId(regattaId).withRegattaAnalyticsManager(null);
|
||||
return clientFactory.getNavigator().getEventNavigation(new RegattaOverviewPlace(ctx), null, false);
|
||||
}
|
||||
|
||||
public PlaceNavigation<?> getRegattaRacesNavigation(String regattaId) {
|
||||
EventContext ctx = new EventContext(getCtx()).withRegattaId(regattaId).withRegattaAnalyticsManager(null);
|
||||
return clientFactory.getNavigator().getEventNavigation(new RegattaRacesPlace(ctx), null, false);
|
||||
|
||||
+4
@@ -7,6 +7,7 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.sap.sailing.gwt.home.client.place.error.ErrorPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.AbstractEventPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventDefaultPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaOverviewPlace;
|
||||
import com.sap.sailing.gwt.home.client.place.event.regatta.tabs.RegattaRacesPlace;
|
||||
import com.sap.sailing.gwt.home.mobile.app.MobileApplicationClientFactory;
|
||||
import com.sap.sailing.gwt.home.mobile.places.latestnews.LatestNewsActivity;
|
||||
@@ -14,6 +15,7 @@ import com.sap.sailing.gwt.home.mobile.places.latestnews.LatestNewsPlace;
|
||||
import com.sap.sailing.gwt.home.mobile.places.minileaderboard.MiniLeaderboardActivity;
|
||||
import com.sap.sailing.gwt.home.mobile.places.minileaderboard.MiniLeaderboardPlace;
|
||||
import com.sap.sailing.gwt.home.mobile.places.races.RacesActivity;
|
||||
import com.sap.sailing.gwt.home.mobile.places.regatta.RegattaActivity;
|
||||
import com.sap.sailing.gwt.ui.shared.dispatch.event.GetEventViewAction;
|
||||
import com.sap.sailing.gwt.ui.shared.eventview.EventViewDTO;
|
||||
import com.sap.sse.gwt.client.mvp.AbstractActivityProxy;
|
||||
@@ -59,6 +61,8 @@ public class EventActivityProxy extends AbstractActivityProxy {
|
||||
public void onSuccess() {
|
||||
if (currentPlace instanceof EventDefaultPlace) {
|
||||
super.onSuccess(new EventActivity(currentPlace, clientFactory));
|
||||
} else if (currentPlace instanceof RegattaOverviewPlace) {
|
||||
super.onSuccess(new RegattaActivity((RegattaOverviewPlace) currentPlace, clientFactory));
|
||||
} else if (currentPlace instanceof RegattaRacesPlace) {
|
||||
super.onSuccess(new RacesActivity((RegattaRacesPlace) currentPlace, clientFactory));
|
||||
} else if (currentPlace instanceof MiniLeaderboardPlace) {
|
||||
|
||||
+1
-2
@@ -3,7 +3,6 @@ package com.sap.sailing.gwt.home.mobile.places.event;
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sap.sailing.gwt.home.mobile.partials.updatesBox.NewsItemLinkProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.places.RegattaRacesNavigationProvider;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.ui.shared.media.SailingImageDTO;
|
||||
|
||||
@@ -11,7 +10,7 @@ public interface EventView extends EventViewBase {
|
||||
|
||||
void setMediaForImpressions(int nrOfImages, int nrOfVideos, Collection<SailingImageDTO> images);
|
||||
|
||||
public interface Presenter extends EventViewBase .Presenter, NewsItemLinkProvider, RegattaRacesNavigationProvider {
|
||||
public interface Presenter extends EventViewBase.Presenter, NewsItemLinkProvider {
|
||||
String getRaceViewerURL(String regattaName, String trackedRaceName);
|
||||
PlaceNavigation<?> getMediaPageNavigation();
|
||||
}
|
||||
|
||||
+8
-4
@@ -5,6 +5,8 @@ import java.util.Collection;
|
||||
import com.google.gwt.user.client.ui.IsWidget;
|
||||
import com.sap.sailing.gwt.home.client.place.event.EventContext;
|
||||
import com.sap.sailing.gwt.home.mobile.places.RegattaLeaderboardNavigationProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.places.RegattaOverviewNavigationProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.places.RegattaRacesNavigationProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.places.SeriesLeaderboardNavigationProvider;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.home.shared.dispatch.DispatchSystem;
|
||||
@@ -23,12 +25,14 @@ public interface EventViewBase extends IsWidget {
|
||||
|
||||
void setSeriesNavigation(String buttonLabel, PlaceNavigation<?> placeNavigation);
|
||||
|
||||
public interface Presenter extends RegattaLeaderboardNavigationProvider, SeriesLeaderboardNavigationProvider {
|
||||
public interface Presenter extends RegattaLeaderboardNavigationProvider, SeriesLeaderboardNavigationProvider,
|
||||
RegattaRacesNavigationProvider, RegattaOverviewNavigationProvider {
|
||||
|
||||
EventContext getCtx();
|
||||
|
||||
DispatchSystem getDispatch();
|
||||
|
||||
PlaceNavigation<?> getEventNavigation();
|
||||
|
||||
DispatchSystem getDispatch();
|
||||
|
||||
EventContext getCtx();
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -1,11 +1,10 @@
|
||||
package com.sap.sailing.gwt.home.mobile.places.races;
|
||||
|
||||
import com.sap.sailing.gwt.home.mobile.places.RegattaRacesNavigationProvider;
|
||||
import com.sap.sailing.gwt.home.mobile.places.event.EventViewBase;
|
||||
|
||||
public interface RacesView extends EventViewBase {
|
||||
|
||||
public interface Presenter extends EventViewBase.Presenter, RegattaRacesNavigationProvider {
|
||||
public interface Presenter extends EventViewBase.Presenter {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -24,7 +24,11 @@ public class ExperimentalFeatures {
|
||||
/**
|
||||
* Provide option to show races (competition format) on mobile devices
|
||||
*/
|
||||
public static final boolean SHOW_RACES_ON_MOBILE = false;
|
||||
public static final boolean SHOW_RACES_ON_MOBILE = true;
|
||||
/**
|
||||
* Provide option to show the overview for regattas in multi regatta events on mobile devices
|
||||
*/
|
||||
public static final boolean SHOW_REGATTA_OVERVIEW_ON_MOBILE = false;
|
||||
/**
|
||||
* Provide option to show the regatta progress for single regatta and series event on mobile devices
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user