Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 41b2f42

Browse files
authored
[ENG-8363] Add resource type helper (#2598)
* add helper * moar fix * add aria label translation string
1 parent 42f13d5 commit 41b2f42

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

lib/osf-components/addon/components/addons-service/configured-addon-edit/component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default class ConfiguredAddonEdit extends Component<Args> {
3636
@tracked selectedResourceType = '';
3737
@tracked isWBGoogleDrive = false;
3838
@tracked accountId!: string;
39+
@tracked isResourceTypeDialogOpen = false;
3940

4041
originalName = this.displayName;
4142
originalRootFolder = this.selectedFolder;

lib/osf-components/addon/components/addons-service/configured-addon-edit/template.hbs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@
169169
{{#if this.isLinkAddon}}
170170
<label>
171171
{{t 'addons.configure.resource-type'}}
172+
<Button
173+
aria-label={{t 'addons.configure.resource-type-helper-aria-label'}}
174+
@layout='fake-link'
175+
{{on 'click' (fn (mut this.isResourceTypeDialogOpen) true)}}
176+
>
177+
<FaIcon @icon='question-circle' />
178+
</Button>
172179
<PowerSelect
173180
@options={{@supportedResourceTypes}}
174181
@selected={{this.selectedResourceType}}
@@ -200,3 +207,27 @@
200207
</Button>
201208
</div>
202209
</div>
210+
211+
<OsfDialog
212+
@isOpen={{this.isResourceTypeDialogOpen}}
213+
@onClose={{action (mut this.isResourceTypeDialogOpen) false}}
214+
@closeOnOutsideClick={{true}}
215+
as |dialog|
216+
>
217+
<dialog.heading>
218+
{{t 'addons.configure.resource-type-helper-header'}}
219+
</dialog.heading>
220+
<dialog.main tabindex='0'>
221+
{{t 'addons.configure.resource-type-helper-body'
222+
htmlSafe=true
223+
}}
224+
</dialog.main>
225+
<dialog.footer>
226+
<Button
227+
@type='secondary'
228+
{{on 'click' dialog.close}}
229+
>
230+
{{t 'general.close'}}
231+
</Button>
232+
</dialog.footer>
233+
</OsfDialog>

translations/en-us.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,9 @@ addons:
376376
heading: 'Configure {providerName}'
377377
resource-type: 'Resource type'
378378
resource-type-placeholder: 'Choose a resource type'
379+
resource-type-helper-aria-label: 'More information about resource types'
380+
resource-type-helper-header: 'About resource type'
381+
resource-type-helper-body: 'This helps others understand what kind of material you''re sharing. Choosing the right resource type makes it easier for search engines and research tools to find and share your work—both on OSF and in other scholarly indexes.<br><br>For example, selecting <b>“Dataset”</b> tells tools and repositories that your files are research data, which helps your work appear in places that specialize in datasets.<br><br>Pick the option that best describes most of the files you''re linking.<br><br>OSF uses resource types from <b>DataCite</b>, a standard used by many research platforms. <a target="_blank" rel="noopener noreferrer" href="https://help.osf.io/article/570-resource-types-in-osf">(Learn more)</a>'
379382
display-name: 'Display name'
380383
selected-folder: 'Selected folder:'
381384
linked-item: 'Linked item:'

0 commit comments

Comments
 (0)