-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat(ui): redesign load data page #19246
Conversation
TODO:
|
import {sortBy} from 'lodash' | ||
|
||
// Contexts | ||
import {WriteDataSearchContext} from 'src/writeData/containers/WriteDataPage' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ITS SPILLING OUT OF NOTEBOOKS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did this to me
|
||
const filteredSections = WRITE_DATA_SECTIONS.filter(section => { | ||
const containsMatches = sectionContainsMatchingItems(section, searchTerm) | ||
const featureFlagEnabled = isFlagEnabled(section.featureFlag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fancy
doesItemMatchSearchTerm(item.name, searchTerm) | ||
) | ||
|
||
const sortedItems = sortBy(filteredItems, item => item.name.toLowerCase()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filteredItems.sort((a,b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()))
now get that lodash nonsense outta here
import WriteDataIndexView from 'src/writeData/components/WriteDataIndexView' | ||
|
||
// Constants | ||
import WRITE_DATA_CLIENT_LIBRARIES_SECTION from 'src/writeData/constants/contentClientLibraries' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come not wrapped in curly brackets?
import {WriteDataItem, WriteDataSection} from 'src/writeData/constants' | ||
|
||
// Markdown | ||
import ArduinoMarkdown from 'src/writeData/components/clientLibraries/Arduino.md' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if only there was a way to self register these to the page.... where have i seen that....
import azure_storage_queueMarkdown from 'src/writeData/components/telegrafPlugins/azure_storage_queue.md' | ||
import bcacheMarkdown from 'src/writeData/components/telegrafPlugins/bcache.md' | ||
import beanstalkdMarkdown from 'src/writeData/components/telegrafPlugins/beanstalkd.md' | ||
import bindMarkdown from 'src/writeData/components/telegrafPlugins/bind.md' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if webpack, could somehow find all of these.. using a folder mechanism....
) | ||
} | ||
|
||
@ErrorHandling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should put watts up to teaching us how to add decorators to functional components
my favorite part was when there was that block of code hidden in the middle of all of that svg code. like treasure hunting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. these telegraf plugins should be served by an api that reads from the latest version of telegraf and not defined here to languish and fall out of spec.... but thats for a different PR. the design looks real nice! like it'll work for people and junk.
This reverts commit 67857f2.
* refactor: rename client libraries from overlay to page * refactor: remove client libraries from load data nav * refactor: remove client libraries from main nav * refactor: convert client library overlays to pages * feat: create Write Data and related sub-pages * fix: assing proper component to route * refactor: separate sections of write data page into own files * refactor: implement telegraf plugins pages * refactor: rename components to match filenames * refactor: organize client libraries within writeData folder * fix: cleanup loose ends from moving files around * refactor: move client lib graphics into write data section * fix: correct import path * fix: import path * feat: enable importing of markdown files * feat: use markdown source for example telegraf plugin * feat: convert Arduino page to use markdown * fix: properly type svg and markdown imports * feat: replace react component images with regular images * feat: add placeholder image for items without images * fix: cleanup * feat: start standardizing pages for write data views * refactor: use params instead making a component for each page * refactor: make client libraries pages all markdown and use template * refactor: cleanup * refactor: move templates out of folder * refactor: style details view * feat(ui): add activemq, aerospike, and bcache * feat(writeData): load up all the telegraf inputs * feat: add telegraf explainer to telegraf plugins pages * refactor: make card grid more compact * refactor: polish * feat(write): adding logos * fix(writeData): more logos * refactor: make CopyButton more customizable * refactor: add real content to telegraf plugin explainer * refactor: polish thumbnail appearance * refactor: make index views scrollable * feat(write): alphabetize & more logos * refactor: increase width of token overlay * refactor: add description to telegraf section * feat: wrap each section in feature flags * refactor: WIP helper widgets for details pages * feat(writeData): add more logos * feat(writeData): update Plugin names, readmes, add logos * feat(write): final batch of logos * feat(write): readme updates * feat(write): adding proxmox * refactor: add tabbed navigation back to browse page * refactor: make code snippets templatized * fix: replace untemplatized URL key in arduino markdown * refactor: cleanup * refactor: rename "browse" to "sources" * refactor: rename feature flags to match page names * refactor: make sort case insensitive * refactor: make code sample helper only appear in client libraries pages * fix: remove image padding from client library logos * fix: select first user bucket instead of first any bucket * fix: make less legible logos more legible * refactor: make search field autofocus * fix: linter error * fix: case sensitive file import * fix: remove empty prop definitions * fix: more case sensitive imports * refactor: remove use of lodash * fix(writeData): update kapa & tele logos; rename internal plugin * fix: repair broken explorer test * fix: rework client libs e2e tests to match new design * refactor: rename e2e test appropriately * refactor: rewrite data sources e2e to assert proper rendering of the details views * feat: add GA tracking of code snippet copy event * chore: changelog update Co-authored-by: Russ Savage <[email protected]>
UX Goals
Architecture Notes
This section of the app is essentially a miniature static site. The addition of markdown and image files for all these pages makes this PR seem much larger than it is. The code previously located in
src/clientLibraries
has been moved and modified to fit the new model.contentClientLibraries
)Build Changes