Datashare
DownloadAbout ICIJGitHub
  • About Datashare
  • Ask for help
  • Concepts
    • Running modes
    • CLI stages
  • About ICIJ
  • Github
  • 💻On your computer
    • About the local mode
    • Install on Mac
      • Install Datashare
      • Start Datashare
      • Add documents to Datashare
    • Install on Windows
      • Install Datashare
      • Start Datashare
      • Add documents to Datashare
    • Install on Linux
      • Install Datashare
      • Start Datashare
      • Add documents to Datashare
    • Install with Docker
    • Find entities
    • Add more languages
    • Install plugins and extensions
    • Neo4j
      • Install Neo4j plugin
      • Create and update Neo4j graph
  • 🌐On your server
    • About the server mode
    • Install with Docker
    • Add documents from the CLI
    • Add entities from the CLI
    • Authentication providers
      • OAuth2
      • Basic with a database
      • Basic with Redis
      • Dummy
    • Neo4j
      • Install Neo4j plugin
      • Create and update Neo4j graph
    • Performance considerations
  • ⚡Usage
    • Search projects
    • Explore a project
    • Search documents
    • Search with operators or Regex
    • Filter documents
    • Explore a document
    • Batch search documents
    • Star, tag and recommend
    • Keyboard shortcuts
    • Create a Neo4j graph and explore it
    • FAQ
      • General
        • Can I use Datashare with no internet connection?
        • Can I download a document from Datashare?
        • Can I remove document(s) from Datashare?
        • Do you recommend OS or machines for large corpuses?
        • Can I use an external drive as data source?
        • How can we use Datashare on a collaborative mode on a server?
        • How can I contact ICIJ for help, bug reporting or suggestions?
        • Why results from a simple search and a batch search can be slightly different?
        • How can I uninstall Datashare?
        • Advanced: how can I do bulk actions with Tarentula?
        • What should I do if I get more than 10,000 results?
        • How to run Neo4j?
      • Definitions
        • What is an entity?
        • What are NLP pipelines?
        • What is fuzziness?
        • What are proximity searches?
      • Common errors
        • 'We were unable to perform your search.' What should I do?
        • List of common errors leading to "failure" in Batch Searches
        • What if Datashare says 'No documents found'?
        • What if tasks are 'running' but not completing?
        • What if the 'View' of my documents is 'not available'?
        • What do I do if Datashare opens a blank screen in my browser?
        • I see entities in the filters but not in the documents
        • Datashare doesn't open. What should I do?
  • 🤓Developers
    • How to contribute
    • Backend
      • API
      • Database Schema
      • Write extensions
    • Frontend
      • Design System
      • Write plugins
    • CLI with Tarentula
    • Script with Playground
Powered by GitBook

Datashare is an open source project by the International Consortium of Investigative Journalists

On this page
Export as PDF
  1. Developers
  2. Frontend

Design System

PreviousFrontendNextWrite plugins

Last updated 3 hours ago

Datashare's frontend is build with Vue 3 and Bootstrap 5. We document all component of the interface on a dedicated Storybook:

To facile the creation of plugin, each component can be imported directly from the core:

// It's usualy safer to wait for the app to be ready
document.addEventListener('datashare:ready', async () => {
    // This load the ButtonIcon component asynchronously
    const ButtonIcon = await datashare.findComponent('Button/ButtonIcon')
    // Than we create a dummy component. For the sake of simplicity we use
    // Vue 3's option API but we strongly encourage you to build your plugins
    // with Vite and use the option API.
    const definition = {
        components: {
            ButtonIcon,
        },
        methods: {
            sayHi() {
                alert('Hi!')
            }
        },
        template: `
            <button-icon @click="sayHi()" icon-left="hand-waving">
                Say hi
            </button-icon>
        `
    }
    
    // Finally, we register the component's definition in a hook.
    datashare.registerHook({ target: 'app-sidebar-sections:before', definition })
})

In the example you learn that:

  • Datashare launch must be awaited with "datashare:ready"

  • You can asynchronously import components with datashare.findComponent

  • Component can be registered on targeted locations with a "hook"

  • All icons from Phosphor are available and loaded automatically

🤓
@storybook/core - Storybook
Logo