github mongodb-js/compass v1.7.0
1.7.0

latest releases: v1.42.6-beta.4, v1.42.6-beta.3, v1.42.6-beta.2...
6 years ago

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.

screenshot 2017-01-11 11 10 49
screenshot 2017-01-11 11 11 02

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

BEFORE:
screenshot 2017-01-23 14 29 25

AFTER:
screenshot 2017-01-23 13 48 25

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."

screenshot 2017-01-23 13 47 47

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.

BEFORE:
screenshot 2017-01-23 14 28 35

AFTER:
screenshot 2017-01-23 13 48 32

COMPASS-588 & COMPASS-683: Custom Scrollbars + Collapsed Sidebar Update (#763)

Custom Scrollbars

  • White in content area
  • Dark on sidebar and in RTSS areas

screenshot 2017-01-24 14 56 48

Collapsed Sidebar Update

Also, bundling changes to COMPASS-683 in this PR as well: https://jira.mongodb.org/browse/COMPASS-683

compass-sidebar-00

  • 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.

screenshot 2017-01-24 14 36 09
screenshot 2017-01-24 14 36 25
screenshot 2017-01-24 14 36 42

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 to filter and adding project, sort, skip and limit.
  • 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-630-architecture

invision prototype

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's button.less file so we can avoid unnecessary overrides
  • Made some small style edits here and there

Screenshots

screen shot 2017-02-08 at 6 15 21 pm
screen shot 2017-02-08 at 6 15 37 pm
Drop database / collection buttons are now red!
screen shot 2017-02-08 at 6 17 44 pm
Space between refresh and apply buttons
screen shot 2017-02-08 at 6 18 33 pm
screen shot 2017-02-08 at 6 19 36 pm
screen shot 2017-02-08 at 6 20 30 pm

  • 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

screenshot 2017-02-09 12 55 14
screenshot 2017-02-09 12 55 21
screenshot 2017-02-09 12 55 25

COMPASS-746: Added autofocus to the first input field in create/delete db/collection/index modals (#781)

…on/index modals

image

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:
screenshot 2017-02-19 17 26 28
screenshot 2017-02-19 17 26 35
Hovering the hostname will expand its contents to display full hostname:
screenshot 2017-02-19 17 26 40
Hovering the SSH connection will expand its contents to display full hostname:
screenshot 2017-02-19 17 26 46
Collapsing the sidebar will not affect the presentation or behavior of the instance header:
screenshot 2017-02-19 17 26 54

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:

new console log statements

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

failed-validation-message-too-fast

AFTER

compass-832-message-now-visible

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 typing enable 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.

screen shot 2017-02-21 at 14 25 44

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.

chartsredux3

What's New

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)

Don't miss a new compass release

NewReleases is sending notifications on new releases.