CUAHSI / CUAHSI/HydroDesktop

Data Site Popups (Mono)

Open
#102 1 comment 0 reactions 0 assignees View on GitHub
CodePlex
Dominant language
C#
Stars
76
Forks
21
PR merge metrics
No merged PRs in 30d

Description

shieldst[CodePlex]

Problem
The little yellow pop-ups that appear when a user hovers over a data site are not functional in Linux or Mac.

The Popup lives in DataDownload (look inside Layer Information gt PopupControl).

On Linux, the Popups just do not work, which is a minor problem; however on Mac OS an exception is thrown every time a pop up is supposed to appear. (Disable Popups in the menu to make error messages stop).

Temporary Solution
I have disabled the popups when running on Mono by adding a condition in DataDownloadPlugin.

The Popup button will be added only if NOT running on Mono.
if (!DotSpatial.Mono.Mono.IsRunningOnMono())
{
App.HeaderControl.Add(_btnShowPopups = new SimpleActionItem(quotShow Map Popupsquot, ShowPopups_Click) { RootKey = SharedConstants.SearchRootkey, GroupCaption = Msg.Results, SmallImage = Resources.popup_16x16, ToggleGroupKey = Msg.Download_Tools_Group, Enabled = false });
_btnShowPopups.Toggling += ShowPopups_Click;
_btnShowPopups.Enabled = false;
}
And the ShowPopups property can be set only if not on Mono.
public bool ShowPopups
{
get { return _showPopups; }
set
{
if (_showPopups == value || DotSpatial.Mono.Mono.IsRunningOnMono()) return;
_showPopups = value;

var handler = ShowPopupsChanged;
if (handler != null)
{
handler(this, EventArgs.Empty);
}
}
}
This is just a temporary solution to the errors being thrown on Mac OS, but we need to find a way to either make the popups work on Mono or display the same information in a different way.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting DataDownload, especially Layer Information's PopupControl, then review the Mono guards in DataDownloadPlugin and the ShowPopups property. Reproduce the hover behavior on Linux or Mac and determine whether the existing popups can work under Mono; done means popups display the data-site information without throwing exceptions, or an equivalent UI is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.