Skip to content
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.9
current_version = 0.1.10
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "quickview"
version = "0.1.9"
version = "0.1.10"
description = "An application to explore/analyze data for atmosphere component for E3SM"
authors = [
{name = "Kitware Inc."},
Expand Down
2 changes: 1 addition & 1 deletion quickview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""QuickView: Visual Analysis for E3SM Atmosphere Data."""

__version__ = "0.1.9"
__version__ = "0.1.10"
__author__ = "Kitware Inc."
__license__ = "Apache-2.0"
2 changes: 2 additions & 0 deletions quickview/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,11 @@ def load_state(self, state_file):
def load_data(self):
with self.state as state:
# Update returns True/False for validity
# force_reload=True since user explicitly clicked Load Files button
is_valid = self.source.Update(
data_file=self.state.data_file,
conn_file=self.state.conn_file,
force_reload=True,
)
state.pipeline_valid = is_valid

Expand Down
10 changes: 8 additions & 2 deletions quickview/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,13 @@ def UpdatePipeline(self):
self.views["continents"] = OutputPort(cont_proj, 0)
self.views["grid_lines"] = OutputPort(grid_proj, 0)

def Update(self, data_file, conn_file, midpoint=0, interface=0):
if self.data_file == data_file and self.conn_file == conn_file:
def Update(self, data_file, conn_file, midpoint=0, interface=0, force_reload=False):
# Check if we need to reload
if (
not force_reload
and self.data_file == data_file
and self.conn_file == conn_file
):
return self.valid

self.data_file = data_file
Expand Down Expand Up @@ -228,6 +233,7 @@ def Update(self, data_file, conn_file, midpoint=0, interface=0):
np.asarray(self.data.GetProperty("InterfaceVariablesInfo"))[::2]
)


tk = GetTimeKeeper()
self.timestamps = np.array(tk.TimestepValues).tolist()
tk.Time = tk.TimestepValues[0]
Expand Down
14 changes: 9 additions & 5 deletions quickview/plugins/eam_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@ def _populate_variable_metadata(self):
if self._DataFileName is None:
return
vardata = self._get_var_dataset()

# Clear existing selection arrays BEFORE adding new ones
self._surface_selection.RemoveAllArrays()
self._midpoint_selection.RemoveAllArrays()
self._interface_selection.RemoveAllArrays()

for name, info in vardata.variables.items():
dims = set(info.dimensions)
if not (dims == dims1 or dims == dims2 or dims == dims3m or dims == dims3i):
Expand All @@ -471,15 +477,13 @@ def _populate_variable_metadata(self):
elif varmeta.type == VarType._3Di:
self._interface_vars.append(varmeta)
self._interface_selection.AddArray(name)
try:
fillval = info.getncattr("_FillValue")
varmeta.fillval = fillval
except Exception:
pass

self._surface_selection.DisableAllArrays()
self._interface_selection.DisableAllArrays()
self._midpoint_selection.DisableAllArrays()

# Clear old timestamps before adding new ones
self._timeSteps.clear()
timesteps = vardata["time"][:].data.flatten()
self._timeSteps.extend(timesteps)

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "app"
version = "0.1.9"
version = "0.1.10"
description = "QuickView: Visual Analyis for E3SM Atmosphere Data"
authors = ["Kitware"]
license = ""
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "QuickView",
"version": "0.1.9"
"version": "0.1.10"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
"signingIdentity": "-"
},
"resources": ["server"],
"shortDescription": "",
Expand Down
131 changes: 126 additions & 5 deletions src-tauri/www/splashscreen.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,143 @@
<style>
body {
margin: 0;
background-color: #444;
}

.splashscreen-container {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 40px 20px;
box-sizing: border-box;
}

.splashscreen-image {
background-color: #444;
background-image: url("splashscreen.png");
background-position: center;
background-repeat: no-repeat;
background-size: 90%;
width: 100vw !important;
height: 100vh !important;
background-size: contain;
width: 90%;
max-width: 600px;
flex: 1 1 auto;
min-height: 200px;
}

.loading-container {
width: 50%;
max-width: 400px;
min-width: 250px;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
margin-top: 40px;
flex-shrink: 0;
}

.loading-text {
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 16px;
letter-spacing: 1px;
animation: pulse 1.5s ease-in-out infinite;
}

.loading-bar {
width: 100%;
height: 4px;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 2px;
overflow: hidden;
position: relative;
}

.loading-progress {
height: 100%;
background: linear-gradient(90deg, #0084ff, #00c4ff);
border-radius: 2px;
position: absolute;
animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
0% {
width: 0%;
left: 0;
}
50% {
width: 60%;
left: 40%;
}
100% {
width: 0%;
left: 100%;
}
}

@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.6;
}
}

.loading-dots {
display: inline-block;
width: 80px;
text-align: left;
}

.loading-dots::after {
content: '';
animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
0% { content: ''; }
25% { content: '.'; }
50% { content: '..'; }
75% { content: '...'; }
}

/* Responsive adjustments for small windows */
@media (max-height: 400px) {
.splashscreen-container {
padding: 20px 10px;
}

.splashscreen-image {
min-height: 100px;
}

.loading-container {
margin-top: 20px;
gap: 10px;
}

.loading-text {
font-size: 14px;
}
}
</style>
</head>

<body>
<div class="splashscreen-image"></div>
<div class="splashscreen-container">
<div class="splashscreen-image"></div>
<div class="loading-container">
<div class="loading-text">
Loading QuickView<span class="loading-dots"></span>
</div>
<div class="loading-bar">
<div class="loading-progress"></div>
</div>
</div>
</div>
</body>
</html>
Loading