Merge BD Bookshelf (0.1.0), BD BookShelfHelper (2.0.0) and BD SimpleEmail
(2.0.0) into a single plugin released as Umbra Bookshelf 1.0.0, with the
BD Bookshelf theme left as a separate, unrenamed artifact.
Modules
includes/books/ catalogue, ISBN/ASIN, series, retail, ratings, shortcodes,
SEO, GDPR, scrapers, admin, CSV/post import
includes/library/ book post type + series taxonomy, pen names, data entry,
shortlinks, reviews, migrate
includes/email/ subscribers, newsletters, composition, sending
Renamed: plugin headers, text domains (all three -> umbra-bookshelf), classes
(BD_*/BDM_* -> Umbra_*), constants (-> UMBRA_BOOKSHELF_*), asset handles, JS
globals and admin slugs.
Deliberately not renamed -- persisted contract with live installs and with
published post content: table names, option keys, post meta keys, transients,
nonce actions, cron hooks, AJAX actions, shortcodes ([bd-book], [bd-books],
[bdm_signup]), post type `book`, taxonomy `series`, cookies and CSS classes.
BD_BookShelfHelper survives only as a class_alias for the unmodified theme.
Collisions resolved
* class-umbra-theme-compatibility.php declared BD_BookShelfHelper, the same
name as the library module's helper. Latent while the plugins were
separate (only fired when both were active), but an unconditional fatal
once merged. Renamed to Umbra_Theme_Compatibility with a class_alias.
* All three modules called add_menu_page. One top-level menu is now
registered by the bootstrap at admin_menu priority 9.
* BD Bookshelf and BookShelfHelper both claimed bd-bookshelf-settings, leaving
one Settings screen unreachable -> umbra-bookshelf-settings and
umbra-bookshelf-library-settings.
* Catalogue and library both enqueued bd-bookshelf-admin; the second enqueue
was silently discarded -> unique handles per module.
* Umbra_Admin and Umbra_Migration both registered bd_bookshelf_import_csv, so
one handler silently replaced the other. The import page now lives only in
Umbra_Admin (the variant wired to the admin JS); Umbra_Migration keeps only
the preview/run endpoints it uniquely provides.
* Modules were constructed from an init callback, so their own init
registrations raced the hook being dispatched. Now constructed on
plugins_loaded behind a re-entrancy guard.
Also
* Missing assets created: assets/images/default-cover.png (referenced but
never committed, so every cover-less book 404'd) and email/assets/js/
admin.js (enqueued on every email admin page but never committed).
* Library module's strpos($hook, 'bd-bookshelf') asset check matched every
catalogue and email screen once slugs shared the umbra-bookshelf- prefix;
now matched against its own slug list.
* Consolidated uninstall deduplicates the double drop of bd_books/bd_series.
* Specs aligned to the new name; pre-merge specs retained under
spec/archive/ with provenance notes.
* Tests added: tests/verify_structure.py (static) and tests/smoke_runtime.php
(WordPress-stub runtime boot, front-end and admin contexts).
Deferred and recorded in docs/KNOWN-ISSUES.md: the catalogue and library
modules still create bd_books and bd_series with two incompatible schemas
(pre-existing, now unconditional), and Goodreads/Amazon scraping is still
implemented twice on shared cron hooks.
301 lines
5.5 KiB
CSS
301 lines
5.5 KiB
CSS
/**
|
|
* BD BookShelfHelper Admin Styles
|
|
* Enhanced Data Entry Interface
|
|
*/
|
|
|
|
/* Data Entry Container */
|
|
.bd-data-entry {
|
|
background: #fff;
|
|
border: 1px solid #c3c4c7;
|
|
border-radius: 4px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
/* Section Headers */
|
|
.bd-data-entry .bd-section-header {
|
|
background: #f0f0f1;
|
|
padding: 12px 16px;
|
|
margin: 0;
|
|
border-bottom: 1px solid #c3c4c7;
|
|
cursor: pointer;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.bd-data-entry .bd-section-header:hover {
|
|
background: #f6f7f7;
|
|
}
|
|
|
|
.bd-data-entry .bd-section-header .dashicons {
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.bd-data-entry .bd-section-header.collapsed .dashicons {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.bd-data-entry .bd-section-content {
|
|
padding: 16px;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
}
|
|
|
|
.bd-data-entry .bd-section-content:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.bd-data-entry .bd-section-content.collapsed {
|
|
display: none;
|
|
}
|
|
|
|
/* Form Fields */
|
|
.bd-data-entry .bd-field {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.bd-data-entry .bd-field:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.bd-data-entry label {
|
|
display: block;
|
|
font-weight: 600;
|
|
margin-bottom: 6px;
|
|
color: #1d2327;
|
|
}
|
|
|
|
.bd-data-entry label .required {
|
|
color: #d63638;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
.bd-data-entry .bd-hint {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: #646970;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.bd-data-entry input[type="text"],
|
|
.bd-data-entry input[type="url"],
|
|
.bd-data-entry input[type="number"],
|
|
.bd-data-entry input[type="date"],
|
|
.bd-data-entry select,
|
|
.bd-data-entry textarea {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.bd-data-entry input.valid {
|
|
border-color: #2d6a4f !important;
|
|
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%232d6a4f" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zm-2 15l-5-5 1.41-1.41L8 12.17l7.59-7.59L17 6l-9 9z"/></svg>');
|
|
background-repeat: no-repeat;
|
|
background-position: right 8px center;
|
|
padding-right: 32px;
|
|
}
|
|
|
|
.bd-data-entry input.invalid {
|
|
border-color: #d63638 !important;
|
|
}
|
|
|
|
.bd-data-entry .bd-validation-message {
|
|
font-size: 12px;
|
|
margin-top: 4px;
|
|
display: none;
|
|
}
|
|
|
|
.bd-data-entry input.invalid + .bd-validation-message {
|
|
display: block;
|
|
color: #d63638;
|
|
}
|
|
|
|
/* Language Tabs */
|
|
.bd-language-tabs {
|
|
display: flex;
|
|
border-bottom: 1px solid #c3c4c7;
|
|
margin-bottom: 16px;
|
|
background: #f0f0f1;
|
|
border-radius: 4px 4px 0 0;
|
|
}
|
|
|
|
.bd-language-tabs .bd-lang-tab {
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
border: none;
|
|
background: transparent;
|
|
font-size: 14px;
|
|
color: #50575e;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.bd-language-tabs .bd-lang-tab:hover {
|
|
background: #f6f7f7;
|
|
}
|
|
|
|
.bd-language-tabs .bd-lang-tab.active {
|
|
background: #fff;
|
|
color: #1d2327;
|
|
font-weight: 600;
|
|
border-bottom: 2px solid #2271b1;
|
|
margin-bottom: -1px;
|
|
}
|
|
|
|
.bd-language-content {
|
|
display: none;
|
|
}
|
|
|
|
.bd-language-content.active {
|
|
display: block;
|
|
}
|
|
|
|
/* Pull Quotes */
|
|
.bd-pull-quotes {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.bd-pull-quotes input {
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
/* Retailer Links Grid */
|
|
.bd-retailer-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
|
gap: 16px;
|
|
}
|
|
|
|
.bd-retailer-grid .bd-field {
|
|
background: #f9f9f9;
|
|
padding: 12px;
|
|
border-radius: 4px;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Auto-save indicator */
|
|
.bd-autosave-indicator {
|
|
position: fixed;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
background: #1d2327;
|
|
color: #fff;
|
|
padding: 8px 16px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.bd-autosave-indicator.visible {
|
|
opacity: 1;
|
|
}
|
|
|
|
.bd-autosave-indicator.saving {
|
|
background: #2271b1;
|
|
}
|
|
|
|
.bd-autosave-indicator.saved {
|
|
background: #2d6a4f;
|
|
}
|
|
|
|
.bd-autosave-indicator.error {
|
|
background: #d63638;
|
|
}
|
|
|
|
/* Preview Button */
|
|
.bd-preview-btn {
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* Action Buttons */
|
|
.bd-data-entry-actions {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 16px;
|
|
background: #f0f0f1;
|
|
border-top: 1px solid #c3c4c7;
|
|
border-radius: 0 0 4px 4px;
|
|
}
|
|
|
|
/* Required field indicator */
|
|
.bd-field.required label::after {
|
|
content: " *";
|
|
color: #d63638;
|
|
}
|
|
|
|
/* Field Groups */
|
|
.bd-field-row {
|
|
display: flex;
|
|
gap: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.bd-field-row .bd-field {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
}
|
|
|
|
/* Status Messages */
|
|
.bd-status-message {
|
|
padding: 12px 16px;
|
|
border-radius: 4px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.bd-status-message.success {
|
|
background: #d1e7dd;
|
|
border: 1px solid #badbcc;
|
|
color: #0f5132;
|
|
}
|
|
|
|
.bd-status-message.error {
|
|
background: #f8d7da;
|
|
border: 1px solid #f5c2c7;
|
|
color: #842029;
|
|
}
|
|
|
|
.bd-status-message.warning {
|
|
background: #fff3cd;
|
|
border: 1px solid #ffecb5;
|
|
color: #664d03;
|
|
}
|
|
|
|
/* Collapsible fields */
|
|
.bd-collapse-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.bd-collapse-toggle .dashicons {
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.bd-collapse-toggle.collapsed .dashicons {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media screen and (max-width: 782px) {
|
|
.bd-retailer-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.bd-field-row {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.bd-data-entry-actions {
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.bd-preview-btn {
|
|
margin-left: 0;
|
|
}
|
|
} |