Comments (9)
This may also be an option to help solve a bit of a "mystery meat" navigation problem: the cog icon doesn't exactly help people understand what it's for, and there's a good chance people are missing it completely.
Showing the icon along with a menu label might be better:
⚙️ Database actions
And:
⚙️ Table actions
For example.
from datasette.
The word "actions" is a bit weird but I think it's OK here? Could mock it up and see how it feels.
from datasette.
Initial prototype:
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: helvetica; }
.icon-text {
font-size: 16px;
display: inline-flex;
align-items: center;
border: 2px solid #666;
border-radius: 6px;
padding: 6px 14px 4px 8px;
}
.icon-text:hover { background-color: #ccc; cursor: pointer; }
.icon {
width: 22px;
height: 22px;
margin-right: 4px;
}
</style>
</head>
<body>
<div class="icon-text">
<svg class="icon" aria-labelledby="actions-menu-links-title" role="img" style="color: #666" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<title id="actions-menu-links-title">Table actions</title>
<circle cx="12" cy="12" r="3"></circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
</svg>
<span>Table actions</span>
</div>
</body>
</html>
from datasette.
New mockup:
from datasette.
Implementation needs a bit more thought because I have to unwind some of the old styles that I used to get the cog to show where it did before (various flex and inline things) - I don't want to leave stale styles in there.
from datasette.
acec927 is what I have so far. Needs a good amount of CSS cleanup, plus I'd like to add the little tip as seen on the column menus:
And set the hover color to the same as the color used on the menu items.
from datasette.
Now looks like this:
from datasette.
Potential alternative design:
diff --git a/datasette/static/app.css b/datasette/static/app.css
index 1fabf7da..ac29ec56 100644
--- a/datasette/static/app.css
+++ b/datasette/static/app.css
@@ -376,9 +376,10 @@ details .nav-menu-inner {
font-size: 15px;
display: inline-flex;
align-items: center;
- border: 2px solid #666;
border-radius: 6px;
padding: 5px 12px 3px 7px;
+ color: #fff;
+ background: linear-gradient(180deg, #4B91F7 0%, #367AF6 100%);
}
.page-action-menu .icon-text span {
/* Nudge text up a bit */
diff --git a/datasette/templates/table.html b/datasette/templates/table.html
index 80eac602..0c2be672 100644
--- a/datasette/templates/table.html
+++ b/datasette/templates/table.html
@@ -29,7 +29,7 @@
<details class="actions-menu-links details-menu">
<summary>
<div class="icon-text">
- <svg class="icon" aria-labelledby="actions-menu-links-title" role="img" style="color: #666" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <svg class="icon" aria-labelledby="actions-menu-links-title" role="img" style="color: #fff" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<title id="actions-menu-links-title">Table actions</title>
<circle cx="12" cy="12" r="3"></circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
from datasette.
On iOS Safari:
from datasette.
Related Issues (20)
- Confusing error if metadata.json contains nested data HOT 2
- ?_trace=1 bug: ASGI callable returned without completing response HOT 2
- Tracer should capture SQL queries that error or exceed their time limit HOT 1
- Suggested facets should only consider first 1000 rows HOT 5
- DateFacet suggestions are incredibly slow against large tables
- Stop counting at 10,000 on table view as well HOT 7
- Extend the default `_footer.html` template
- Foreign key labels for tables with unique indexes on multiple columns HOT 1
- results.dict() method for SQL query results HOT 1
- Opt-in mechanism for CSS on form inputs and buttons HOT 6
- Update plugins to use new "core" CSS class HOT 3
- Improvements to Datasette Events documentation
- Datasette row URLs break for binary data as a primary key HOT 3
- Clean up other CSS styles that apply to elements without a class HOT 3
- Unable to run pytest for new installation HOT 2
- Proposal: add new `DATASETTE_SSL_KEYFILE` and `DATASETTE_SSL_CERTFILE` env vars for `--ssl-keyfile` and `--ssl-certfile` HOT 4
- SQLITE_EXTENSIONS environment variable should be DATASETTE_LOAD_EXTENSION HOT 4
- `request.post_vars()` cannot handle multiple values for a key HOT 1
- Upgrade to SQLite 3.46.0 or newer to support ISO Week '%V'
- How to avoid downloading the CSV file? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette.