Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Studio // Dont override column config when one aleady exists #1506

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

Dinika
Copy link
Contributor

@Dinika Dinika commented Feb 21, 2024

This is a hotfix for this bug in production.

How to test

Two scenarios should be tested.

  1. Create a new dashboard with a long query like this one. On clicking "Configure Columns", you should see 16 columns.
PREFIX nxv: <https://bluebrain.github.io/nexus/vocabulary/>
PREFIX nsg: <https://neuroshapes.org/>
PREFIX schema: <http://schema.org/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> 

PREFIX bmo: <https://bbp.epfl.ch/ontologies/core/bmo/>

SELECT DISTINCT (CONCAT(STR(?self_wo_tag), '?tag=20240219') AS ?self) ?name ?brainRegion ?subjectName ?subjectSpecies ?subjectStrain ?xCoordinate ?yCoordinate ?zCoordinate ?somaNumberOfPoints (CONCAT(STR(?length), " (", ?unit, ")") AS ?totalAxonLength) ?reconstructionSystem ?paperCitation (STRAFTER(?atlas_identifier_, "data/") AS ?atlasIdentifier) ?contributor (STRAFTER(?registered_by_str, "users/") AS ?registeredBy) ?registeredAt
WHERE { 
  GRAPH ?g0 {
?entity nxv:self ?self_wo_tag ;
        a nsg:NeuronMorphology ;
        nxv:deprecated false ;
        schema:name ?name ;
        nxv:createdBy ?registered_by ;
        nxv:createdAt ?registeredAt .
OPTIONAL { ?entity nsg:contribution / prov:agent ?contributor_id } .
OPTIONAL { ?entity nsg:subject / schema:name ?subjectName } .
OPTIONAL { ?entity nsg:subject / nsg:species / rdfs:label ?subjectSpecies } .
OPTIONAL { ?entity nsg:subject / nsg:strain / rdfs:label ?subjectStrain } .
OPTIONAL { ?entity nsg:brainLocation / nsg:coordinatesInBrainAtlas / nsg:valueX ?xCoordinate ;
         		   nsg:brainLocation / nsg:coordinatesInBrainAtlas / nsg:valueY ?yCoordinate ;
         		   nsg:brainLocation / nsg:coordinatesInBrainAtlas / nsg:valueZ ?zCoordinate} .
OPTIONAL { ?entity  nsg:isRegisteredIn ?atlas_identifier } .
OPTIONAL { ?entity  nsg:generation / prov:activity / nsg:hadProtocol / schema:keywords ?reconstructionSystem } .
OPTIONAL { ?entity  nsg:generation / prov:activity / nsg:hadProtocol / schema:citation ?paperCitation } .
BIND (STR(?registered_by) AS ?registered_by_str) . 
BIND (STR(?atlas_identifier) AS ?atlas_identifier_) . 
 }
 OPTIONAL { ?contributor_id schema:name ?contributor } .
 GRAPH ?g {
    OPTIONAL {
      ?entity nsg:brainLocation / nsg:brainRegion / rdfs:label ?brainRegion .
    }
  }
      OPTIONAL { 
 GRAPH ?g1 {
  ?somaAnnotation a nsg:Annotation ;
                  nsg:hasTarget / nsg:hasSource ?entity ;
                  bmo:compartment "Soma" ;
                  nsg:hasBody ?somaBody .
          ?somaBody nsg:isMeasurementOf / rdfs:label "Soma Number Of Points" ;
                schema:value / nsg:series ?soma_mean_stat .
          ?soma_mean_stat nsg:statistic "N" ;
                     schema:value ?somaNumberOfPoints } .
  }
     OPTIONAL { 
   GRAPH ?g2 {
        ?axonAnnotation a nsg:Annotation ;
           nsg:hasTarget / nsg:hasSource ?entity ;
             bmo:compartment "Axon" ;
                      nsg:hasBody ?axonBody .
          ?axonBody nsg:isMeasurementOf / rdfs:label "Total Length" ;
                schema:value / nsg:series ?axon_mean_stat .
          ?axon_mean_stat nsg:statistic "raw" ;
                     schema:value ?length ;
         			 schema:unitCode ?unit } .
  }
 FILTER (?registeredAt > "2023-09-01T00:00:00+00:00"^^xsd:dateTime)
}   
LIMIT 1000 
  1. Create a simple dashboard. Enable some settings (like searching, sorting etc). Refresh page, and open the dialog again. The settings should have been preserved.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added necessary unit and integration tests.
  • I have added screenshots (if applicable), in the comment section.

@Dinika Dinika force-pushed the studio-enable-search branch from 6db74e2 to d635b96 Compare February 22, 2024 06:37
@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (a15e5f1) 47.89% compared to head (3a2afc4) 48.01%.
Report is 31 commits behind head on develop.

Files Patch % Lines
src/shared/components/EditTableForm.tsx 15.38% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1506      +/-   ##
===========================================
+ Coverage    47.89%   48.01%   +0.12%     
===========================================
  Files          250      251       +1     
  Lines        11474    11560      +86     
  Branches      2696     2709      +13     
===========================================
+ Hits          5495     5551      +56     
- Misses        5946     5976      +30     
  Partials        33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Dinika Saxena <dinikasaxenas@gmail.com>
@Dinika Dinika force-pushed the studio-enable-search branch from d635b96 to 3a2afc4 Compare February 22, 2024 08:28
@Dinika Dinika merged commit 82f15c6 into develop Feb 22, 2024
1 check passed
@Dinika Dinika deleted the studio-enable-search branch February 22, 2024 09:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants