The Compass Team is proud to announce our latest release on the Stable channel, 1.7.0
. This release is now generally available from the MongoDB Download Center for macOS and Windows, Ubuntu and Red Hat Enterprise Linux.
Featured
COMPASS-608: Database and Collections Table Click-Affordance (#739)
Nothing mind blowing. Don't love, don't hate.
thoughts @Sean-Oh ?
- Renamed instances of .btn-link to .btn-borderless to better reflect its current use
- Created new class for .btn-link to create a .btn with blue link text
- Created a .btn-case-sensitive helper class to allow for database and collection name case sensitivity. Bumped the font-size slightly for legibility and reduced the padding on .btn-xs on case-sensitive versions to match uppercase versions in height.
COMPASS-515: View Real-Time Server Stats when connected to a mongos (#747)
This pull request improves the behavior of Real-Time Server Stats when connected to a deployment that has sharding enabled. Instead of just showing an error with no data at all, we gracefully degrade what charts are available in Real-Time Server Stats using the isMongos()
check that was recently added to the data-service
.
cc @davidjlutz, @aherlihy, @durran
COMPASS-668 - RTSS Error / Warnings Placement (#760)
RTSS view changes:
- Moved MongoS / secondary warnings beneath play/pause action-bar
- Moved errors up into the controls-container (i.e. above the drop-shadow area, actually completed in COMPASS-616)
- Removed styling on RTSS errors and used status-row component
Status-row component changes:
- Tweaked the style of errors slightly to be more muted. There is some thinking behind this: errors and warnings occurring in the communication between compass and your DB should not feel AS critical as errors and warnings occurring in the user actions which may affect your data. Therefore, the super bold red with white text should be reserved for things like "hey, you're going to delete this." or "hey, your data has been deleted."
Explain plan view changes:
- Create a new variable to handle the warnings separate from the content, so that warnings can be rendered within the controls-container (i.e. above the drop-shadow) where previously it was beneath the drop-shadow.
COMPASS-588 & COMPASS-683: Custom Scrollbars + Collapsed Sidebar Update (#763)
Custom Scrollbars
- White in content area
- Dark on sidebar and in RTSS areas
Collapsed Sidebar Update
Also, bundling changes to COMPASS-683 in this PR as well: https://jira.mongodb.org/browse/COMPASS-683
- Simplified usage of grays
- Clicking anywhere on the collapsed sidebar will now expand the sidebar. Further, clicking any of the three icons in the collapsed sidebar will both expand the sidebar as well as perform that icons functionality. (i.e. home icon expands + navigates to the databases table; refresh icon expands + refresh collection/db list; search icon expands + focuses on the filter input)
- Flexbox layout for accurate scrolling, adjustments to version and ssh info in instance area.
RTSS layout update
- Flexbox lets the layout fluidly fill the screen when expanding, and fit in default window size better.
COMPASS-630 + COMPASS-631 advanced query bar (#754)
This PR adds the new advanced query bar which allows users to enter not just a filter, but also project
, sort
, skip
and limit
.
Schema view
The mongodb-collection-sample module now supports project
limit
is capped at 1000 documents, but lower values can be entered.
Explain view
data-service explain currently does not pass options to the find command, therefore only filter
is exposed (as before). Once the change in data-service is made, we can expose all other query options.
Code Review Notes
This is a big PR, so I'll summarize the major changes here.
- New QueryStore, renaming
query
tofilter
and addingproject
,sort
,skip
andlimit
. - New QueryBar component, which is expandable/collapsible and hosts the new query options. They are validated individually and the label turns red if an input is invalid.
- Schema, Documents and Explain required changes so they support the new query options. Not all options are supported yet, see above.
TODO
- Tests for the advanced query options (sort, projection, skip, limit)
- make query option bubbles red when the input is not valid
add info sprinkles into the query option bubbles(need documentation update first)
COMPASS-722: BEM Buttons + Death to Mongostrap (#776)
Introduction
In this PR, I aim to:
- Remove mongostrap as a dependency since Compass barely uses it
- Update Compass's button CSS to match @colinkeany's styles located in this Invision
In doing so, I've:
- Introduced a new
button.less
file, where we should make all core button changes going forward. - Commented out links to
mongostrap.less
and bootstrap'sbutton.less
file so we can avoid unnecessary overrides - Made some small style edits here and there
Screenshots
Drop database / collection buttons are now red!
Space between refresh and apply buttons
- Clean up the
button.less
file a bit more and maybe tidy up the visuals - Fix issues in CRUD / Validation footer buttons
- Add CSS for dropdown menus
- Define best practices (BEM, react parameters, etc) to keep the codebase consistent
cc: @fredtruman
COMPASS-431 - Move explain plan view switcher into action bar (#772)
The goal of this PR is to change the explain plan view in a couple ways:
- move the view switcher controls UP into a "controls-container" area to match the pattern on all the other collection views.
- move the nicely laid out query summary section (explain-summary) so that it's only visible on the TREE view (no longer visible on the JSON view)
- removed the "explain-header" since its only job was to contain the explain-summary and view-switcher controls, and since I moved them we don't need it
- made the view switcher controls disabled by default
- added support for info sprinkle links in query summary section from COMPASS-362 https://jira.mongodb.org/browse/COMPASS-362
COMPASS-746: Added autofocus to the first input field in create/delete db/collection/index modals (#781)
…on/index modals
COMPASS-721: Instance Header (#784)
This PR's goal is to:
- Create a new module, called "InstanceHeader" that is viewable globally
- The InstanceHeader displays:
-- Hostname and port connection (far left)
-- SSH Connection information
-- MongoDB Version (far right)
-- Also, has placeholder markup and styles for replica set state (not enabled yet)
Screenshots:
Zero state has some "loading" strings:
Hovering the hostname will expand its contents to display full hostname:
Hovering the SSH connection will expand its contents to display full hostname:
Collapsing the sidebar will not affect the presentation or behavior of the instance header:
TODO:
- cursor: point on hostname
- enable active state on hostname
- test on host with SSH enabled
- delete styles for deleted "sidebar-instance-properties" elements
- remove broken functional tests for deleted "sidebar-instance-properties" elements
- write new functional tests for new "instance-header"
@KeyboardTsundoku / @rueckstiess wondering if I could get some assistance in properly removing the old functional tests from sidebar-instance-properties and writing new ones for instance-header?
COMPASS-601 Speedup Compass Start: Use inline requires and prefetching (#796)
New Console Statements
Firstly, this PR adds some new console.log
statements to track the value of window.performance.now() at various points:
Note that on my system timing still varies significantly from the best of 5, as I really couldn't be bothered turning off all my background apps to test it in isolation, though the trend should be clear if you play with it before and after.
~20% perceived speed up
Secondly, it optimises index.js
to clean up some things that no longer make sense, or don't need to block the initial Connect Window render like metrics (for example, it's used later by the router).
The most important new console statement is the render done
statement - that's when the user first perceives they can interact with Compass. My before/after testing (see commit messages) indicates this is now around 20% faster.
Preloading data-service, etc
Thirdly after the Connect Window render has taken place, it pre-loads some things required to connect, like data-service, in a new postRender
function.
This pattern looks like it could be significantly extended, for example if we could for boot time load only a minimal subset of our internal-packages into hadron-package-manager. Logically it makes sense that you don't need features like Document Validation to be loaded before the Connect Window even renders, though it does make sense to load them as soon as free resources become available. However that would require additional work and risk which is not presently in scope of this ticket.
COMPASS-849: Backport COMPASS 832 - Return to avoid running the success case on error of insert document (#821) (#826)
BEFORE
AFTER
Note: Tried to create a functional test for this, but got mired in that the functional test suite does not currently test for validation rules and it was nontrivial to add such a new create validation rule test which is a prerequisite for setting up this condition, hence this is only manually tested at this time.
Charts
COMPASS-729 add feature flag chartView and chart collection tab (#788)
Changes:
-
added a feature flag
chartView
, which can be enabled by typingenable chartView
into the filter of the query bar and pressing "Apply". Then reload (or tab into another tab, which also triggers a refresh of the tab bar). -
added an empty tab with a query bar, warning message where we can start placing charts views.
-
no tests added because this code will most likely go away when we split the distributions.
COMPASS-701 First pass at Vega-Lite chart actions, store and tests (#766)
@rueckstiess @KeyboardTsundoku As discussed at poker today, ready for 👀 to look for any likely issues in using what's built here so far to render React components such as FieldPanel
, DraggableField
, etc, or transform it into a valid Vega-Lite spec and render the actual chart.
See also our Charts Architecture doc.
Known questions which I haven't thought about yet and will most likely continue with tomorrow:
- src/internal-packages/chart/lib/constants.js: Repeated key/value names suggest I'm actually looking for a different data structure, possibly something like a Python namedtuple, does anyone know of a similar pattern or appropriate library to reuse in JavaScript? [No longer applicable as we've changed to UPPER_SNAKE_CASE keys and kebab-case values]
- src/internal-packages/chart/lib/store.js: // TODO How should we subscribe to [mongodb-]schema updates (+tests)? [Deferred to COMPASS-727]
- src/internal-packages/chart/lib/store.js:
dataCache: [],
// TODO: Populate with a $sample if ns or query change? [Deferred to COMPASS-726] - src/internal-packages/chart/lib/store.js: COMPASS-631 (#754) where I recall we did some renaming, so we should check that
queryCache
is still an appropriate name. - TODOs related to COMPASS-686 (upgrade to reflux 6+) which should just be checking we are OK deferring that upgrade until a later time.
What's New
- COMPASS-608: Database and Collections Table Click-Affordance (#739)
- COMPASS-515: View Real-Time Server Stats when connected to a mongos (#747)
- COMPASS-685: fix flexbox redesign (#749)
- COMPASS-648 reorganize test structure (#755)
- COMPASS-668 - RTSS Error / Warnings Placement (#760)
- COMPASS-665 Decouple DDL into new package (#752)
- COMPASS-558 Add DDL buttons (#745)
- COMPASS-619: Fix error notification icon path on Linux (#761)
- COMPASS-586: Improve Linux appearance (logo in popups/about box, ...) (#762)
- COMPASS-588 & COMPASS-683: Custom Scrollbars + Collapsed Sidebar Update (#763)
- COMPASS-653: Stop top on error spam (#759)
- COMPASS-705: Style pass for DDL buttons (#765)
- COMPASS-630 + COMPASS-631 advanced query bar (#754)
- COMPASS-701 First pass at Vega-Lite chart actions, store and tests (#766)
- COMPASS-649 add vega/vega-lite chart component (#773)
- COMPASS-722: BEM Buttons + Death to Mongostrap (#776)
- COMPASS-431 - Move explain plan view switcher into action bar (#772)
- COMPASS-722 Button Patch #1 (#780)
- COMPASS-746: Added autofocus to the first input field in create/delete db/collection/index modals (#781)
- COMPASS-532: Fix forced reflow caused by react-tooltip (#777)
- COMPASS-756: Demote babel-register and drop environment.js (#783)
- COMPASS-722 Button & Form Patch #2 (#786)
- COMPASS-698: Charts draggable field (#767)
- COMPASS-729 add feature flag chartView and chart collection tab (#788)
- COMPASS-788: mongodb:// in clipboard message has regressed on macOS / Red Hat (#787)
- COMPASS-791: Refactor the listening pattern in Schema, CRUD and Explain stores (#790)
- COMPASS-721: Instance Header (#784)
- COMPASS-601 Speedup Compass Start: Use inline requires and prefetching (#796)
- COMPASS-790 handle sampling errors better (#795)
- COMPASS-809 Add "project" query option to schema query bar (#797)
- COMPASS-834: Don't focus on instance when clicking refresh (#815)
- COMPASS-532: Don't use pseudo selectors for strings (#816)
- COMPASS-849: Backport COMPASS 832 - Return to avoid running the success case on error of insert document (#821) (#826)
- COMPASS-853 Backport COMPASS 745 ⬆️ connection-model@6.4.3 & data-service@2.13.1 (#830) (#831)
- COMPASS-855: Backport COMPASS 466: Properly remove clipboard detection (#833) (#834)
- COMPASS-989: Backport COMPASS 904 per plugin tooltip (#904) (#907)
- COMPASS-890+920+924: Undo special-casing
allowDiskUse
for Atlas + Charts (#879) (#924) - COMPASS-1079: Backport COMPASS 915 double values undefined and COMPASS 972 ":" in password to 1.7-releases (#957)
- COMPASS-1171: Backport GUID fix to 1.7-releases (#994)
- COMPASS-1160: add what's new slides to feature tour for 1.7 (#998)
- COMPASS-1183 backport COMPASS-810 (#1005)
- COMPASS-1182 sidebar tour slide (#1006)
- COMPASS-1190: Backport COMPASS 1144 default sort should be null (#1009)
- COMPASS-1220 ⬆️ mongodb-ns@2 for 1.7-releases (#1033)
- COMPASS-1212: Fix Evergreen Ubuntu keytar build failure (#1038)
18 Other Changes Missing JIRA in Commit Messages
-
Improve test README and link to it from the main README (#757)
-
⬆️ data-service@2.5.1 (#769)
-
add dependencies, tests, pluralize components dir (#774)
-
Fix options passing with new node driver (#778)
-
Use New Data Service Store/Action API in RTSS Package. (#779)
-
Use IPC calls instead of webcontents (#785)
-
validate feature flags in query filter and... (#791)
-
with fix (#798)
-
Fix UI thrashing on collection view: (#799)
-
Update README.md: Master is broken: Add npm test (#802)
-
Compass Instance Header Color Tweak (#801)
-
Compass Instance Header Tweaks 01 (#805)
-
only reset the 5 query options when restoring the query (#808)
-
Only resize minicharts if active tab is schema view (#806)
-
extract field names from arrays of sub-docs (#809)
-
with fix (#804)
-
Update readme - remove duplicate info (#817)
-
Backport to 1.7-releases: Re-cache node_modules (#828) (#836)