<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:25:34 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[COMPASS-582] Convert collection store into a proper reflux store with associated actions</title>
                <link>https://jira.mongodb.org/browse/COMPASS-582</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;p&gt;The standard reflux pattern is the unidirectional cycle from component to action to store to component.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/compass/tree/619da1af6d0209eb938bc3048de4a446429cb837&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Currently&lt;/a&gt; the collection store (internal-packages/app/stores/collection.js) is not using this reflux pattern properly.&lt;/p&gt;

&lt;p&gt;Primary reason to do this ticket are two folds:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;It is being used less as a store and more of a setter/getter in multiple different places, which breaks the reflux pattern&lt;/li&gt;
	&lt;li&gt;It currently sets the namespace, when it should listen to the namespace store instead (This was a challenge in completing COMPASS-548).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There are two issues here:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;collection index component sets active tab onto the store, which is accessed in a few different places via &lt;tt&gt;getActiveTab&lt;/tt&gt;, which really isn&apos;t a clean pattern. The solution is to add an isActive property to the the tabs to flag whether it is visible/active/displayed or not&lt;/li&gt;
	&lt;li&gt;a collection dump from the instance store is being cached onto this collection store every time a new collection is viewed, only to access the &apos;readonly&apos; property. The solution is to store instance state in the home store. The collection store gets a list of instance collections every time the home store changes, and sets a readonly status when namespace is a collection.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Here are where the calls are being made:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;getActiveTab
	&lt;ul&gt;
		&lt;li&gt;chart-builder&lt;/li&gt;
		&lt;li&gt;chart store&lt;/li&gt;
		&lt;li&gt;schema component&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;setCollection
	&lt;ul&gt;
		&lt;li&gt;databases-table&lt;/li&gt;
		&lt;li&gt;collections-table&lt;/li&gt;
		&lt;li&gt;sidebar-collection&lt;/li&gt;
		&lt;li&gt;sidebar-database&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;isReadonly
	&lt;ul&gt;
		&lt;li&gt;collectionStats store&lt;/li&gt;
		&lt;li&gt;document-list&lt;/li&gt;
		&lt;li&gt;compass-explain&lt;/li&gt;
		&lt;li&gt;explain store&lt;/li&gt;
		&lt;li&gt;indexes index-header component&lt;/li&gt;
		&lt;li&gt;indexes component&lt;/li&gt;
		&lt;li&gt;load-indexes store&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;After this we can either get rid of the collection store or convert it to a proper store that lives in &lt;tt&gt;/internal-packages/collections/lib/store&lt;/tt&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="340236">COMPASS-582</key>
            <summary>Convert collection store into a proper reflux store with associated actions</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13203">Gone away</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="satyendra.sinha@mongodb.com">Satyendra Sinha</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Dec 2016 22:23:34 +0000</created>
                <updated>Fri, 27 Oct 2023 20:19:31 +0000</updated>
                            <resolved>Tue, 13 Oct 2020 13:39:40 +0000</resolved>
                                                    <fixVersion>No version</fixVersion>
                                    <component>Tech debt</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1617190" author="satyendra.sinha" created="Sun, 9 Jul 2017 13:25:50 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/10gen/compass/pull/1108&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;PR&lt;/a&gt; attempted to resolve this ticket but it was solving several problems at once and made it difficult to review. So let&apos;s split it into separate tickets:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-1347&quot; title=&quot;Consistently call namespaces throughout compass&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-1347&quot;&gt;&lt;del&gt;COMPASS-1347&lt;/del&gt;&lt;/a&gt;: So that namespace is used properly&lt;/li&gt;
	&lt;li&gt;COMPASS-1360: So that there is no awkward loop to retrieve the readonly status of a collection&lt;/li&gt;
	&lt;li&gt;COMPASS-1138: So that a particular tabbed component need to peek into the collection store and check against a number to determine whether it is focused or not (This wasn&apos;t handled in the above PR but is definitely an improvement to the current design that removes the need for &lt;tt&gt;getActiveTab&lt;/tt&gt; which is one of the problems mentioned in this ticket)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;After the above 3 are done explicitly add collection store to the collection package and connect to the component. as done in &lt;a href=&quot;https://github.com/10gen/compass/pull/1108/commits/235609d8870e37d034f760887a790c5b2bf48f39&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;https://github.com/10gen/compass/pull/1108/commits/ef118abb21d91239b8571312862ea23984f4aa4e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this&lt;/a&gt; commit.&lt;/p&gt;

&lt;p&gt;You may notice that the above PR funnels the instance store into the home store. This made sense at the time because then the sidebar, collection and collections store all listen to changes in the home store. The changes in the ticket mentioned above can also be done without making these 3 store listen to the home store and listening to the instance store directly but the way it is setup maybe less clean.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="401909">COMPASS-1347</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 31 weeks, 3 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/COMPASS-1347'>COMPASS-1347</a></s>]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 31 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>satyendra.sinha@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht01xz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht6yfb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrq7uv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>