Giter VIP home page Giter VIP logo

dashboard's People

Contributors

blurfx avatar chacha912 avatar dongjins avatar eddie0329 avatar emplam27 avatar g2hhh2ee avatar gollumnima avatar hackerwins avatar iyu88 avatar joohojang avatar krapie avatar mihilt avatar yoonkijin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboard's Issues

Add option to edit snapshot threshold in project settings

Description:

Currently, users are unable to adjust the snapshot threshold in the project settings page. It would be beneficial to provide an option for users to edit the snapshot threshold in order to tailor it to their specific needs.

ex)

Why:

This feature would enhance the customization capabilities of the project.

Add basic account action feature

Description:
With the recent introduction of the ChangePassword and DeleteAccount RPCs in the server, it is now feasible to implement corresponding features in the dashboard to allow admins to perform these actions.

This issue is a follow-up to the issue of yorkie-team/yorkie#849

Why:
To provide administrators with the ability to manage their accounts more effectively and efficiently through the dashboard.

Duplicate documents with the same key are shown on Dashboard

Description:

Duplicate documents with the same key are shown on the Dashboard.

  1. Create a document and remove it with Yorkie CLI.
  2. Add another document with the same key.
  3. View the Dashboard where the documents are displayed.
  4. Note the duplication of documents with the same key.

This issue seems to be reproducible when using the force option in Yorkie CLI to forcefully delete documents.

Bug where attributes set in Tree are not displayed in the dashboard

Description:

There is a bug where attributes set in Tree are not displayed in the dashboard.

Dashboard retrieves detailed information about a document by calling the GetDocument API from the server. It is suspected that attributes might be missing in the snapshot generated by the server.

Dashboard:

getDocumentAsync({
projectName,
documentKey,
}),

Server: https://github.com/yorkie-team/yorkie/blob/525cacf2747f53187e41fd495e41f1b26e0a5d4e/server/rpc/admin_server.go#L209-L233

Why:

Provide document content in more readable format in preview page

Description:
Current document preview page directly shows the raw content in a document like below:

d

The content should be provided in a more readable form. For example, Text type can be showed as a styled text.

Why:
Current document preview format is too hard for human to read.

Implement pagination in DocumentList

Description:

Implement pagination to ListDocuments.

In #3, we called ListDocuments API and then displayed a list of documents on the screen. We implemented ListDocuments API considering pagination, but we didn't implement the behavior in the front-end.

Let's fetch documents incrementally and then display them on the screen.

References

Why:

  • Reduce the load when Yorkie has a lot of documents.

Introduce login button for mobile users

Description:
Currently, the login button is not visible on the mobile page, which creates difficulty for mobile users to access the login page. To improve user experience, it is recommended to introduce a login redirect button that is clearly visible and accessible on the mobile page to direct users to the login page seamlessly.

Why:
Enhance the accessibility and usability of the platform for mobile users.

Implement logout

Description:

Implement logout.

We implemented the login in #23 but did not implement logout. When a user logs in, the authentication token is stored in localStorage as a value of token.

Let's remove the token in localStorage and then redirect to the login page when clicking the logout button in the navigation bar.

Why:

Users can log out of Yorkie House.

Documents list disappears when refresh browser.

Description:
As time went by, I began to realize that this PR(#114) causes ‘documents’ managed by redux to be lost when refreshing browser.

error.mp4

This is because, when browser is refreshed, state of the history object has persistence, but redux cannot maintain its redux store.

Not only refreshing browser, but user also can request ~/projects/:projectName/documents/:documentKey directly without clicking, so without fetching data inside useEffect was a problematic approach.

Maybe the attempt to solve issue with using ‘state’ of react-router was also bad approach from the beginning.

Why:

When moving to the document detail page, the document list should be kept

Description:

When moving to the document detail page, the document list should be kept.

  • When the document is clicked, the document list is initialized to page 1.
    doc1

  • When the back button is clicked in the document detail view, the document list is initialized to page 1.
    doc2

Why:
Users can easily navigate documents when keeping the document list

Proposal > Refactor status render by condition

Description:

Suggest to make StatusWrapper for handling all status.
Currently, components, such as Overview, DocumentDetail, DocumentList, ...etc, are rendered by status like below.

export function Overview() {
  return (
    <div>
      {status === 'loading' && <div>Loading...</div>}
      {status === 'failed' && <div>Failed!</div>}
      {status === 'idle' && <div>{project?.name}</div>}
    </div>
  );
}

Status loading and failed are commonly used and thought it could be good first step to refactor.

export function StatusWrapper({ children, status }) {
  if (status === 'loading') return <div>Loading...</div>
 else if (status === 'failed') return <div>Failed!</div>
 else return children;
}
export function Overview() {
  return (
     <div>
        <StatusWrapper status={status}>
            <div>{project?.name}</div>
        </StatusWrapper>
     </div>
  )
}

Why:

To Eliminate duplicates and easily handle status.

Implement basic layout and Introduce router

Description:

Implement basic layout and Introduce page router.

  • Add a sidebar to the left side of the screen
  • Move the page when the user clicks on an item in the sidebar

references:

Why:

  • Users can separate and manage multiple resources on each page in the service.

Remove error popup when users try to sign up or logout

Description:
When users try to sign up or log out in yorkie house, users get an error message from the popup.
But I'm not sure this repository is the right place to discuss this issue.

스크린샷 2022-09-08 오후 8 11 27

Why:
I think this error message is not suitable for upper cases and we need to separate different cases for authentication.

Implement project list page

Description:

Implement the project list page and set it as the default page.

  • Page: /projects

Why:

  • Users can manage projects.

Proposal > Make svg tag to component

Description:

Suggest to make svg (icon) to React component.

// Sidebar.tsx
<svg
  className="w-6 h-6 transition duration-75"
  fill="currentColor"
  viewBox="0 0 20 20"
  xmlns="http://www.w3.org/2000/svg"
>
    <path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
     <path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path>
</svg> 
export default function SettingIcon() {
   return (
      <svg>...</svg>
   );
}

Why:

Can tell developer what svg looks like before build project!

Getting error "protoc-gen-js: program not found or is not executable" when "npm run build:proto"

Description:

"npm run build:proto" makes error "protoc-gen-js: program not found or is not executable" with protoc version 3.21.1.

After downgrade protoc version to 3.19.4, "npm run build:proto" makes no error. (refer protocolbuffers/protobuf-javascript#105)

"npm run build" script in package.json need to be changed for work with the latest version of protocol or read.me should tell me the appropriate protocol version.

Why:
Can work with the latest version of protocol buffer.

Modify variable spelling

Description:

In PR #114, I think that I found a subtle misspelling.

스크린샷 2023-04-28 09 39 28

DocumentList.tsx

I think previousProjectName is more accurate spelling.

So it would better to remove 'e'.

Why:

Grammarly spelling ensures that code understanding is not impaired.

Show total count of documents

Description:
We show the total number of search results in the document search.
We should also show the total count of documents on the document list page.

as-is to-be
image image

Why:

The user can recognize how many documents there are.

Implement time format preference

Description:

Implement time format preference

  • User settings page

image

  • The time should be displayed in the format set by the user in the settings

image

Why:

Users can select a time format preference.

Script error when executing `tree.styleByPath`

Description:

While using yorkie.Tree, an error occurs only in the dashboard, not in the app, when trying to view document. The error message is left and right are not in the same list.

tree-error.mov

How to reproduce:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>There are currently <span id="peersCount"></span> peers!</div>
    <button id="styleButton">styleByPath</button>
    <!-- include yorkie js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/yorkie-js-sdk/0.4.4/yorkie-js-sdk.js"></script>
    <script>
      async function main() {
        const client = new yorkie.Client('https://api.yorkie.dev', {
          apiKey: '👉enter-your-key',
        });
        await client.activate();
        client.subscribe((event) => {
          if (event.type === 'peers-changed') {
            const peers = client.getPeersByDocKey(doc.getKey());
            document.querySelector('#peersCount').innerHTML = peers.length;
          }
        });
        const doc = new yorkie.Document('sample-tree');
        doc.update((root) => {
          root.tree = new yorkie.Tree({
            type: 'root',
            children: [
              {
                type: 'comp1',
                children: [
                  {
                    type: 'comp2',
                    children: [
                      {
                        type: 'comp3',
                        children: [
                          {
                            type: 'comp4',
                            children: [],
                          },
                        ],
                      },
                    ],
                  },
                ],
              },
              {
                type: 'comp1',
                children: [
                  {
                    type: 'comp3',
                    children: [
                      {
                        type: 'comp4',
                        children: [],
                      },
                    ],
                  },
                ],
              },
            ],
          });
          root.selection = {};
        });
        await client.attach(doc);

        doc.update((root) => {
          root.tree.editByPath([1, 0, 0, 0], [1, 0, 0, 0], { type: 'text', value: 'a' });
        });
        doc.update((root) => {
          root.tree.editByPath([1], [1], {
            type: 'comp1',
            children: [
              { type: 'tableRow', children: [{ type: 'tableCell' }, { type: 'tableCell' }, { type: 'tableCell' }] },
              { type: 'tableRow', children: [{ type: 'tableCell' }, { type: 'tableCell' }, { type: 'tableCell' }] },
              { type: 'tableRow', children: [{ type: 'tableCell' }, { type: 'tableCell' }, { type: 'tableCell' }] },
            ],
          });
        });

        document.querySelector('#styleButton').addEventListener('click', () => {
          // 🚨 error occurs
          doc.update((root) => {
            root.tree.styleByPath([1], { bold: true });
          });
        });
      }
      main();
    </script>
  </body>
</html>
  1. Update the API key in the code and open the browser.
    (You can get the API key of the project on Dashboard.
  2. Before clicking the button, the document displays correctly on the dashboard.
  3. When clicking the button, the tree.styleByPath is executed, which results in an error on the dashboard.

Probable Cause:
The issue occurs when retrieving documents in the dashboard using the admin API GetDocument. During the handling of the GetDocument request on the server, the document is built using BuildDocumentForServerSeq(go). However, in the app, the document is built using js-sdk. So, there seems to be a difference in behavior between Go and JS-SDK, leading to errors in the dashboard(Go) but not in the app(JS-SDK).

Environment:

  • Yorkie JS SDK version: v0.4.4

Show the last-updated time of a document correctly

Description:
If the document has only been created, the last-updated time does not appear correctly. When creating a document, the last-updated time should be initialized to the time the document was created.

image

Why:
To provide the user with accurate information about the document.

Add a feature to delete document

Description:

The feature to delete documents has been implemented in yorkie-team/yorkie#484.
Let's provide a UI in the dashboard to delete documents.

  • On the document detail page:
    image
  • On the document list page:
    image

Why: Users can delete document.

Implement document detail page

Description:

Implement document detail page.

The document detail page is shown when the user selects a document from the document list page.

  • document list page: /documents
  • document detail page: /documents/{document ID or Key}

Why:

  • The user can access the document again using the URL of a specific document.

Store auth token in a cookie

Description:

Store auth token in a cookie.

We implemented the login in #31 but we store the auth token in localStorage.

Since localStorage can be referenced by JavaScript, storing the token in a cookie is recommended.

Let's store the auth token in a cookie.

Why:

  • LocalStorage/SessionStorage is vulnerable to XXS attacks.

Re-add the revision feature to the dashboard

Description:

Show the tooltip when the user moves the mouse over the slider marker.
Tooltips are helpful to show additional information like actor, message, and time.

as-is

Wordpress Revision UI

Why:

The users can get information about histories when they move the mouse pointer over the slider.

Script error when accessing a document created by ProseMirror example on dashboard

Description:

Script error when accessing a document created by ProseMirror example on dashboard

After creating the document of the ProseMirror example of the JS SDK, there seems to be a script error occurring when accessing the document on the Dashboard.

In the example, the selection is saved as a byte array type in the document to propagate it to the peers.

Screenshot 2023-06-28 at 2 07 44 PM

However, this seems to be causing a script error when performing JSON.parse on the Dashboard.

Why:

Authentication Error Occurred (only client)

스크린샷 2022-10-06 오후 3 27 50

Description:

If you go back after refreshing the login page, you will see an error window.

Why:

  • open house.yorkie.dev
  • move house.yorkie.dev/login
  • refresh
  • back history
  • error window

Generating a document by <script> tag throws CORS Error

Description:

When I generate a document by <script> tag, CORS issue occurs like this.

스크린샷 2023-05-02 12 54 20

I used to create a document using <script> tag,
but since I used the same way in the latest version, the document was not generated.
I tried 3 different yorkie-js-sdk versions.

0.3.4

2023-05-02.13.01.33.mov

0.3.3

2023-05-02.13.01.55.mov

0.3.1

2023-05-02.13.02.30.mov

The Last two versions work fine.
It works differently depending on the version, so I think it might be an issue of yorkie-js-sdk, not of the dashboard, but I'll post it here for now. I would appreciate it if you let me know if I need to move.

Why:

To generate a document using the <script> tag

Add query string in URLs

Description:

We need to add a query string in URLs.
URL parameters (query strings) are elements inserted in URLs to help you filter and organize content or track information on the website.
The main use-case of the query string is filtering: specifically searching and pagination.

ex)

  • document list
    • documents?pageIndex=2&pageSize=15
    • documents?limit=15&after_id=20 📎
  • document search :
    • documents/search?q=keyword
    • documents?search=keyword

Why:

Users can easily find where they were and understand their location on a page.

Script error when accessing a document containing special characters in Tree data type

Description:

When displaying documents with special characters such as double quotes " or new lines \n within the Tree data type, an error occurs on the dashboard when viewing the document.

image
image

How to reproduce it (as minimally and precisely as possible):

  1. Run the provided HTML code with your apiKey included.
  2. View the document on the dashboard.
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>test</div>

    <!-- include yorkie js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/yorkie-js-sdk/0.4.13/yorkie-js-sdk.js"></script>
    <script>
      globalThis.process = {
        env: { },
      };
      async function main() {
        const client = new yorkie.Client('https://api.yorkie.dev', {
          apiKey: '', // enter your apiKey
        });
        await client.activate();

        const doc = new yorkie.Document('docKey');
        await client.attach(doc);

        doc.update((root) => {
          root.t = new yorkie.Tree({
            type: 'doc',
            children: [
              {
                type: 'p',
                children: [{ type: 'text', value: 'hello"\n' }],
                attributes: { bold: true },
              },
            ],
          });
        });
      }
      main();
    </script>
  </body>
</html>

Show a success message when projectInfo has updated

Description:
Show a success message when project info has been updated.

Why:
When updating project info, it is applied without any notice. It is difficult for the user to know if the update has been applied.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.