@@ -86,7 +86,46 @@ export class WorkStackGroupComponent implements OnInit, OnDestroy {
8686
8787 userRecordContext : UserRecordOptions = { }
8888
89- private _baseAddMenuOptions = [
89+ /** New dropdown: order and copy match Figma (node 177:15217). Used when SEARCH_AND_LINK_WIZARD_WITH_CERTIFIED_AND_FEATURED_LINKS is true. */
90+ private _baseAddMenuOptionsNew = [
91+ {
92+ label : $localize `:@@works.addMenu.importFromServices:Import works from other services` ,
93+ description : $localize `:@@works.addMenu.importFromServicesDescription:Connect with services that can help keep your ORCID record up-to-date` ,
94+ action : ADD_EVENT_ACTION . searchAndLink ,
95+ id : 'cy-add-work-search-link' ,
96+ } ,
97+ {
98+ label : $localize `:@@works.addMenu.importBibtex:Import works from a BibTeX file` ,
99+ description : $localize `:@@works.addMenu.importBibtexDescription:Import works into your ORCID record using BibTeX` ,
100+ action : ADD_EVENT_ACTION . bibText ,
101+ modal : WorkBibtexModalComponent ,
102+ id : 'cy-add-work-bibtext' ,
103+ } ,
104+ {
105+ label : $localize `:@@works.addMenu.addWorkDoi:Add work with a DOI` ,
106+ action : ADD_EVENT_ACTION . doi ,
107+ modal : WorkExternalIdModalComponent ,
108+ type : EXTERNAL_ID_TYPE_WORK . doi ,
109+ id : 'cy-add-work-doi' ,
110+ } ,
111+ {
112+ label : $localize `:@@works.addMenu.addWorkPubmed:Add work with a PubMed ID` ,
113+ action : ADD_EVENT_ACTION . pubMed ,
114+ modal : WorkExternalIdModalComponent ,
115+ type : EXTERNAL_ID_TYPE_WORK . pubMed ,
116+ id : 'cy-add-work-pubmed' ,
117+ } ,
118+ {
119+ label : $localize `:@@works.addMenu.addWorkManually:Add work manually` ,
120+ description : $localize `:@@works.addMenu.addWorkManuallyDescription:Enter the work details yourself` ,
121+ action : ADD_EVENT_ACTION . addManually ,
122+ modal : WorkModalComponent ,
123+ id : 'cy-add-work-manually' ,
124+ } ,
125+ ]
126+
127+ /** Legacy dropdown: simple labels, original order. Used when SEARCH_AND_LINK_WIZARD_WITH_CERTIFIED_AND_FEATURED_LINKS is false. */
128+ private _baseAddMenuOptionsLegacy = [
90129 {
91130 label : $localize `:@@shared.searchLink:Search & Link` ,
92131 action : ADD_EVENT_ACTION . searchAndLink ,
@@ -122,12 +161,16 @@ export class WorkStackGroupComponent implements OnInit, OnDestroy {
122161
123162 addMenuOptions : {
124163 label : string
164+ description ?: string
125165 action : ADD_EVENT_ACTION
126166 modal ?: ComponentType < any >
127167 type ?: EXTERNAL_ID_TYPE_WORK
128168 id ?: string
129169 } [ ] = this . _buildAddMenuOptions ( false )
130170
171+ /** True when SEARCH_AND_LINK_WIZARD_WITH_CERTIFIED_AND_FEATURED_LINKS is on: show new Figma-style Works add dropdown. */
172+ useNewWorksAddMenuStyle = false
173+
131174 $destroy : Subject < boolean > = new Subject < boolean > ( )
132175 $loading : Observable < boolean >
133176
@@ -190,12 +233,16 @@ export class WorkStackGroupComponent implements OnInit, OnDestroy {
190233 )
191234 . pipe ( take ( 1 ) , takeUntil ( this . $destroy ) )
192235 . subscribe ( ( useCertifiedAndFeatured ) => {
236+ this . useNewWorksAddMenuStyle = useCertifiedAndFeatured
193237 this . addMenuOptions = this . _buildAddMenuOptions ( useCertifiedAndFeatured )
194238 } )
195239 }
196240
197241 private _buildAddMenuOptions ( useCertifiedAndFeatured : boolean ) {
198- return this . _baseAddMenuOptions . map ( ( opt ) => {
242+ const base = useCertifiedAndFeatured
243+ ? this . _baseAddMenuOptionsNew
244+ : this . _baseAddMenuOptionsLegacy
245+ return base . map ( ( opt ) => {
199246 if ( opt . action === ADD_EVENT_ACTION . searchAndLink ) {
200247 return {
201248 ...opt ,
0 commit comments