Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support choosing the Full Name Direction in Sp7 tree def editing interface #5073

Closed
Tracked by #5312
bronwyncombs opened this issue Jul 5, 2024 · 2 comments
Closed
Tracked by #5312
Labels
1 - Request A request made by a member of the community 2 - Database/Schema Issues that are related to the underlying database and schema 2 - Trees Issues that are related to the tree system and related functionalities. 2 - User Interface Issues that are related to the user interface or user experience.

Comments

@bronwyncombs
Copy link

Is your feature request related to a problem? Please describe.

With the implementation of adding and editing tree ranks and full name construction configuration in Sp7, we left out an ability that Sp6 had: changing the direction that full names are ordered. In Sp6, this option is included in the dialog from clicking the pencil by the tree name in the Edit Tree Definition page

Screenshot 2024-07-05 at 1 49 57 PM

This has already been run into in the ohio mollusk conversion, but we're able to work around it in this case.

one question, while we're on this form — where does the definition for the aggregated field in the "geography" field here live? I want to modify it to display in the opposite order

Still, I think it's important that all functions available in 6 be sufficiently carried over to 7.

Describe the solution you'd like
I think a dedicated full name editing dialog with a similar display to the grid view in sp6 could be added. This could be accessed from a button that appears to the left of the rank names once edit ranks is selected? This would allow for all ranks and whether or not they're in the full name to be viewed at once, and give a better place for the

Icon for button could be "Adjustments" from hero icon

Screenshot 2024-07-05 at 3 27 13 PM

image

Alternatives:

  • In matching 6, this option should be added to the main geography tree edit dialog, rather than the individual edit rank dialogs. Or somewhere else where it appears once for the whole tree. However, putting this in that dialog does seem a bit out of place or risky.
Screenshot 2024-07-05 at 2 57 39 PM
  • This may be able to be added to preferences under the Trees section, but there's the issue of scoping. A global or remote pref line could also be an option but is not ideal since this is harder/more confusing than the way 6 handles it.

Additional context

Looks like even if you add it to the TreeDef form the field remains readonly...
Max hardcoded this in Specify back in October 2022: 2162e32
So there is no way right now to change the full name direction in the application
image

When you create a new TreeDef through the application, it doesn't assign it a fullnamedirection.
I'd hope Specify 7 just assumes this is forward, but not sure how 6 reacts to that...
image

@bronwyncombs bronwyncombs added 1 - Request A request made by a member of the community 2 - Trees Issues that are related to the tree system and related functionalities. 2 - Database/Schema Issues that are related to the underlying database and schema 2 - User Interface Issues that are related to the user interface or user experience. labels Jul 5, 2024
@melton-jason
Copy link
Contributor

As a workaround to not being able to set the full name diretion, you can create a picklist with two items:

Title Value
Forward 1
Reverse -1
Screen.Recording.2024-07-05.at.8.31.15.PM.mov

Actually, this is what the frontend should be doing automatically.
Looks like that picklist functionality broke somewhere along the line:

const fullNameDirection = definePicklist('_fullNameDirection', [
createPickListItem('-1', formsText.reverse()),
createPickListItem('1', formsText.forward()),
]);


346220602-ff60d458-cca6-400d-b102-e63ef5c7e3ec

Using the picklist we defined previously, this layout is actually already possible in Specify 7 by defining a TreeDef form.

Screenshot 2024-07-05 at 8 16 42 PM
Screen.Recording.2024-07-05.at.8.17.00.PM.mov
<viewdef name="TaxonTreeDef" class="edu.ku.brc.specify.datamodel.TaxonTreeDef" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
	<desc>The TaxonTreeDef Table</desc>
	<enableRules/>
	<columnDef>p,2px,p,2px,p,2px,p,2px,p,2px,p,p:g</columnDef>
	<rowDef auto="true" cell="p" sep="2px"/>
	<rows>
		<row>
			<cell type="label" labelfor="name"/>
			<cell type="field" id="name" name="name" uitype="text"/>
		</row>
		<row>
			<cell type="label" labelfor="fullNameDir"/>
			<!--   The FullNameDirection picklist can be explicitly specified here, but is inferred because the PickList is assigned at the Schema Config for the field -->
			<cell type="field" id="fullNameDir" name="fullNameDirection" default="1" uitype="combobox"/>
		</row>
		<row>
			<cell type="label" labelfor="remarks"/>
			<cell type="field" id="remarks" name="remarks" uitype="textareabrief" rows="2" colspan="6"/>
		</row>
		<row>
                         <!--    Not specifying viewname: Specify is using the view called TaxonTreeDefItem (default for the table)   -->
			<cell type="subview" id="items" name="treeDefItems" colspan="8" defaulttype="table" initialize="sortField=rankId"/>
		</row>
	</rows>
</viewdef>

@grantfitzsimmons grantfitzsimmons changed the title Support choosing the Full Name order in Sp7 tree def editing interface Support choosing the Full Name Direction in Sp7 tree def editing interface Jul 8, 2024
@grantfitzsimmons
Copy link
Member

Fixed for all trees in 6ef8046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Request A request made by a member of the community 2 - Database/Schema Issues that are related to the underlying database and schema 2 - Trees Issues that are related to the tree system and related functionalities. 2 - User Interface Issues that are related to the user interface or user experience.
Projects
None yet
Development

No branches or pull requests

3 participants